craftpip / jquery-confirm

A multipurpose plugin for alert, confirm & dialog, with extended features.
http://craftpip.github.io/jquery-confirm/
MIT License
1.87k stars 508 forks source link

Interaction with jquery UI widgets #195

Closed jonasgroendahl closed 7 years ago

jonasgroendahl commented 7 years ago

i have a jQUery-confirm and im trying to display some content which have a select and my select.selectMenu() doesn't seem to work because it's being displayed inside the jQUery-confirm. It's just showing the default select.I can easily call .selectMenu() on a select outside the scope and it will change from select to a selectmenu. Example: HTML:


<div id="aDiv"> 
     <select id="aSelect"> <option value="1"> 1 </option></select>
 </div>
 <button type="button" id="aButton">Click </button>

CSS:

#aDiv {
     display: none;
}

JS:

$(document).ready(function() {
  $('#aSelect').selectMenu();
  var divVar = $('#aDiv');
  $('#aButton').on("click", function() {
       $.confirm( {
            title: 'Hello',
            content: '',
            onOpen : function() {
                divVar.show();
                this.setContent(divVar);
            },
            onClose : function() {
               divVar.hide();
            }

         });
     });
 }); 

How do i make jquery-confirm show jquery ui widgets like selectmenu?

Posted here as well: http://stackoverflow.com/questions/41610478/display-selectmenu-inside-jquery-confirm/41610554#41610554

craftpip commented 7 years ago

I have replied in the stackoverflow post. please let me know if that is what you're trying to do

jonasgroendahl commented 7 years ago

added a reply!

craftpip commented 7 years ago

Added a reply on stackoverflow, closing this issue.