Alternative to jquery live that can work

后端 未结 3 2059
悲&欢浪女
悲&欢浪女 2020-12-10 15:23

I have this simple code. http://jsfiddle.net/borth/BmEZv/ If you click on the link once, it works fine. If you click on it a second time, it doesn\'t work. Due to the html b

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-10 16:15

    .on() can be used with or without delegation, below is an example of on() using delegation.

    $("#ABC").on('click', ".OpenPopup", function(e){
    

    http://jsfiddle.net/BmEZv/1/

提交回复
热议问题