Jquery inside modal box function -


i use next function build modal box. , need jquery combo box inside modal box.

      function launchmodal(id) {         jquery('body').append('<div id="catmodal" title=""><select id="ac_s1"><option value="home security"></option></select></div>');         jquery('#'+id).dialog({           resizable: false,           height: 370,           width: 900,           modal: true,           buttons: {close: function(){jquery(this).dialog('close');}},           close: function(event, ui){jquery(this).dialog('destroy').remove();}         }); 

and wrote

jquery(document).ready(function(){ jquery("#ac_s1").combobox(); }

but works outside modal box function, if insert inside of modal box function content, stops working , simple html select menu appears.

how solve it???

give id modal div - modaldiv

write html in that

try $('#modaldiv').html(.......) or $('#modaldiv').text(.......)


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -