Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropkick change function only executes correctly the first time its called #106

Closed
ChayaCooper opened this issue Mar 22, 2013 · 0 comments
Closed

Comments

@ChayaCooper
Copy link

This change function executes correctly when I only need to set another element's value (line 5), but when I add the rest of the function (lines 3 - 4) it only executes correctly the first time and then stops working after that.

$('#select1').dropkick({
    change: function () {
        var option = $('#select2').find("option[value*=default]");
        option.attr('value', option.attr('value').replace(/_default/g, ''));
        $('#select2').val($('#select1').val());
    }
});

I found a potential solution on a Drupal forum. I'm not a Drupal user so I don't know how to apply it to my situation, but I thought it might be helpful for someone more experienced than myself http://drupal.org/node/1342002 (the last posting by mossill)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant