Turning live() into on() in jQuery

后端 未结 5 2208
盖世英雄少女心
盖世英雄少女心 2020-11-21 22:28

My application has dynamically added Dropdowns. The user can add as many as they need to.

I was traditionally using jQuery\'s live() method to detect w

5条回答
  •  春和景丽
    2020-11-21 23:03

    Just found a better solution which doesn't involve editing third party code:

    https://github.com/jquery/jquery-migrate/#readme

    Install the jQuery Migrate NuGet package in Visual Studio to make all the versioning issues go away. Next time Microsoft update their unobtrusive AJAX and validation modules perhaps try it without the migrate script again to see if they resolved the issue.

    As jQuery Migrate is maintained by the jQuery Foundation I think this is not only the best approach for third party libraries and also to get warning messages for your own libraries detailing how to update them.

提交回复
热议问题