jquery - Submit form on Switchery (checkbox) state change -
i using switchery on 1 of form designed using asp.net mvc. now, submit form iis server when state changes. tried following code no luck.
$(document).ready(function(){ $('.switchery').on('click',function(){ $('form').submit(); }); });
any on how achieve behavior?
i able work following code.
$(document).on('click', '.switchery', function () { $('form').submit(); })
hope helpful someone.
Comments
Post a Comment