$(…).on is not a function - jQuery Error

后端 未结 5 720
旧巷少年郎
旧巷少年郎 2020-12-15 15:34

I am using dialog box, which I am closing when a user click anywhere on page expect that dialog box.

Here is my code:

$(\'body\').on(\'click\',\'.ui-         


        
5条回答
  •  醉梦人生
    2020-12-15 16:09

    The replacement for .on() in jQuery > 1.4.2 is delegate()

    $('body').delegate('.ui-widget-overlay', 'click', function () {
        $('#myRateSettingsPopup').dialog('close');
    });
    

提交回复
热议问题