close a popup with javascript

edited June 26, 2020 in Questions
I asked this the other day and Zack wrote a snippet for closing 1 popup. Now I need to close 2.
I tried modifying the snippet, but can't get it to work
 close_popup = function(){         var popup_array = skuid.$('.ui-dialog-content');
         for (i = 0; i < popup_array.length; i++){
        popup_array[i].dialog('destroy');
        popup_array[i].remove();}
    };
i do get the array, which appears to have dom elements in it, but i get "undefined is not a function" when i try and call destroy
do i have to somehow transform the array item into something jquery can call 'dialog' on ?

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!