jquery - Close modalbox on click -


i close query ui modalbox when user clicks on rest of page in background.

i added snippet isn't working:

$('.ui-widget-overlay').on("click", function() {     //close dialog     $(this).find(".dialog").dialog("close"); });  

example

$('body').on('click','.ui-widget-overlay', function() {     $('.ui-dialog').filter(function () {     return $(this).css("display") === "block";     }).find('.ui-dialog-content').dialog('close'); }); 

demo

this works... found here


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -