Proper use of .on method in Jquery

前端 未结 6 1765
慢半拍i
慢半拍i 2020-12-11 17:13

I really liked the .live method as it was straightforward and essentially not much different than your standard event handler.

Alas, it was deprecated and I\'m left

6条回答
  •  抹茶落季
    2020-12-11 17:51

    jQuery(document).on('click', '#who_me', function(){
        alert('test123');
        return false;
    });
    

    should be the equivalent of jQuery.live('#who_me', function() { // code here });

提交回复
热议问题