欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

$(...).on is not a function 有大用


本人用的是 bind 来代替 on 
The problem may be if you are using older version of jQuery. Because older versions of jQuery have 'live' method instead of 'on'

来自 
http://stackoverflow.com/questions/15670352/typeerror-on-is-not-a-function

Method on was introduced in jQuery version 1.7.

I think you have to upgrade your jQuery library to the newest version.

Otherwise, you can use bind:

$( ".ui-widget-overlay" ).bind( "click", function(e) {
    $('#myRateSettingsPopup').dialog('close');
    e.stopPropagation(); 
});

来自 http://stackoverflow.com/questions/21625231/on-is-not-a-function-jquery-error
普通分类: