-
Notifications
You must be signed in to change notification settings - Fork 329
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
Manual trigger of change() #257
Comments
If you could provide some sample code, or a JSBin we could help you out a lot easier. |
Sure, you are right. Here we go: http://jsbin.com/pohosorusi/1/edit?html,js,output The basic JS code for this reproduced scenario is at the bottom. |
hi macstens. Have you managed to find some workaround for this issue until issue is fixed? I was going to create an issue and found this ticket :) |
Unfortunately not... sorry. |
Haven't had much time to work on this lately, but we are definitely committed to the 2.1 milestone deadline of January 1st. So expect to see a more elegant solution then. In the meantime, you could do this: var dk = new Dropkick( selectElement, {...});
dk.data.settings.change.call( dk );
// or this will just reselect the currently selected option and
// call the change event along with triggering the select's change event.
dk.select( dk.selectedIndex ); The second one is untested, but I don't see why it shouldn't work |
If you use the code from the master branch (which you no longer need to include the plugins separately), it should work now. |
Hi! Following problem:
My DropKick select-list has a change function which is working, but at some point I need to trigger it based on another action. It doesn't seem to be possible (at least at a trivial level) - is there a simple trick I didn't see before I start hacking in the original source code?
Thanks!
The text was updated successfully, but these errors were encountered: