4

I'm trying to do a two steps modal window. The first is a form with a submit button, once you click it, it should close the modal, and open a second modal window with different content and design. I can't use jquery hide/show to toggle different divs because in this case the second modal is totally different. If I do this, it doesn't work

$('#callLink').click(function(){ $('#jqAgenda').jqmHide(); $('#jqConfirm').jqmShow(); });

callLink is inside jqAgenda modal window

Thanks


This worked fine, the overlay stays on the background while the new modal window is being loaded.

$('#callLink').click(function(){ $('#jqAgenda').jqmHide(); }); $('#jqCall').jqm({trigger: '#callLink'});

Solved :)

1 Answers1

0

It has a onhide event where you can bind a function when your current modal is closed.

onHide (callback)
Called when a dialog is to be hidden. Be sure to remove the overlay (if enabled).
// onHide : fade the window out, remove overlay after fade. 

    var myClose=function() { 
     //open a new modal here
    };


$('#dialog').jqm({onHide:myClose}); 

//(function|false) - default: false

If not working try to bind click function to modals close button or anything that closes it when clicked

Ronel Solano
  • 63
  • 1
  • 6
  • Thanks Ronel, I've been trying with that callback with no luck, I was able to accomplish what I was looking for with this code `$('#callLink').click(function(){ $('#jqAgenda').jqmHide(); }); $('#jqCall').jqm({trigger: '#callPolice'});` – user1684022 Sep 19 '12 at 19:45