jquery.unobtrusive-ajax plugin broken when updating to Jquery 1.9.0 [duplicate]

天大地大妈咪最大 提交于 2019-11-27 16:00:47

Equivalent of live using on (delegation) is:

$(document).on("click","a[data-ajax=true]", function (evt) {...});

You can find jquery's .on() method documentation here:

>> http://api.jquery.com/on/ <<

The .on() method attaches event handlers to the currently selected set of elements in the jQuery object. As of jQuery 1.7, the .on() method provides all functionality required for attaching event handlers. For help in converting from older jQuery event methods, see .bind(), .delegate(), and .live().

To remove events bound with .on(), see .off(). To attach an event that runs only once and then removes itself, see .one()

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!