2014-08-14, 09:55 PM
Alright, so here's how I did it:
First I added a new modal container:
Then I added this link to the first modal (In this case, the login one):
And lastly I added this JS:
Worked like a charm, let me know if it gives you any problems. Also note that if they close the modal, when it's re-opened it won't have the original contents in it, those have to be changed back as well, or the page has to be refreshed. I'd provide a fix but I imagine this is the preferred functionality for plugins.
First I added a new modal container:
<div id="other-form" style="display: none;">Testing!</div>
Then I added this link to the first modal (In this case, the login one):
<a href="#" class="changelink">Test</a>
And lastly I added this JS:
$('.changelink').on('click', function() {
$('#login-form').fadeOut('slow', function() {
$('#login-form').html($('#other-form').html());
$('#login-form').fadeIn();
});
});
Worked like a charm, let me know if it gives you any problems. Also note that if they close the modal, when it's re-opened it won't have the original contents in it, those have to be changed back as well, or the page has to be refreshed. I'd provide a fix but I imagine this is the preferred functionality for plugins.