Turning live() into on() in jQuery

后端 未结 5 2205
盖世英雄少女心
盖世英雄少女心 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:19

    In addition to the selected answers,

    If you use Visual Studio, you can use the Regex Replace.
    In Edit > Find and Replace > Replace in Files
    Or Ctrl + Shift + H

    In Find and Replace pop-up, set these fields

    Find what: \$\((.*)\)\.live\((.*),
    Replace with: $(document.body).on($2,$1,
    In find options check "Use Regular Expressions"

提交回复
热议问题