Jquery simplemodal close existing modal and open a new one?

Posted by matthewsteiner on Stack Overflow See other posts from Stack Overflow or by matthewsteiner
Published on 2010-04-27T03:52:08Z Indexed on 2010/04/27 16:53 UTC
Read the original article Hit count: 361

Filed under:
|

Alright, so all modals already have an image at the top right to close them. How can I make additionally another anchor to do the same thing? I thought I could use the "closeClass" option which default to "simplemodal-close" and just add that class to an anchor, but it didn't have the desired effect. Is that what I'm supposed to do? Also, all modals will have a "contact us" link which should close it's own modal and open the contact modal. How can I wait until it is closed to open the next one?

Ideas?

$('a#ask').click(function(){
        $.modal.close(function(){
        });
        $('#modal-contact').modal();
    });

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about simplemodal