Jquery .on versus .live

前端 未结 4 468
梦谈多话
梦谈多话 2020-12-09 15:58

I know that .live() is now deprecated but I cannot seem to change it and keep the functionality.

I just have a quick question about the

4条回答
  •  轮回少年
    2020-12-09 16:44

    The on() function requires a syntactical update, you should alter your code to:

    $('body').on("click", "table tr th", function()...
    

    Check out this article for more info: http://www.andismith.com/blog/2011/11/on-and-off/

提交回复
热议问题