Alternative to jquery live that can work

后端 未结 3 2054
悲&欢浪女
悲&欢浪女 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:16

    $(document).ready(function(){
            $(document.body).on('click', ".OpenPopup", function(e){
                alert('test .OpenPopup');
                // do something
                return false;
            });
            $(document.body).on('click', ".EditIcon", function(){
                alert('test .EditIcon');
                // do something
                $("#ABC").html('
    click here again
    '); }); });

提交回复
热议问题