Get all dialogs listed
Get all dialogs listed
Hi,
I was wondering is there a way to get all dialogs and close/open them with a button that has .live("click") set to it?
Tried using this
- $("button").live("click",function(){
- $("div.ui-dialog").dialog("close");
- });
but it didn't work.
Edit
Got it working, here is the code (if someone want's it)
- $('button').live('click', function(){
- $("div.ui-dialog").each(function(){
- var id = $(this).attr("aria-labelledby").replace('ui-dialog-title-','');
- $("#"+id).dialog("close");
- });
- return false;
- });