javascript - embed swf in jquery ui modal dialog -


i'm embed swf jquery ui modal dialog, when open dialog swf played, , when close dialog, , reopen dialog without refresh page, swf did not loaded first. want swf reopened first when close , open dialog

this code of dialoge:

$( "#quiz" ).dialog({     open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); },     autoopen: false,     resizable: false,     draggable: false,     modal: true,     width: 750,     height:350 });  $( "#quiz-link" ).click(function( event ) {     $( "#quiz" ).dialog( "open" );        event.preventdefault();     }); }); 

try rebuilding html of dialog each time open/close it. think you're showing & hiding currently, never resets.

try out instead:

$( "#quiz-link" ).click(function( event ) {       // create clone of dialog      var quiz_clone = $( "#quiz" ).clone().appendto(body);       quiz_clone.dialog({         open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); },         autoopen: false,         resizable: false,         draggable: false,         modal: true,         width: 750,         height:350     });      // destroy clone when it's closed     quiz_clone.on('close', function() {         quiz_clone.dialog( "destroy" ).remove();     });      // show clone     quiz_clone.dialog( "open" );     event.preventdefault(); }); 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -