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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -