Reputation: 35
I recently update the jquery version on my website due to an update of the CMS spip, and in consequence i had to also update the dropkick.js.
I would like to get a form submit on a select change. Before the update i used this code who worked fine:
$('.x_select').dropkick({
change:function(value,label) {
$(this).closest('form').submit();
}
});
But whith the new version of dropkick http://dropkickjs.com/api.html it doesnt work anymore, and i dont know what i have to modify.. Any idea ?
Thank you.
Upvotes: 0
Views: 372
Reputation: 10141
You can submit the form as shown below:
$('.x_select').dropkick({
change:function(value,label) {
$(this.form).submit();//changed here
}
});
Upvotes: 0