So I have a javascript function that shows the register form after the onclick but it doesn't refresh because it is on the same page. It just loads another form in. But when I have the Reset Password page and I want a button that goes directly to the register form instead of the standard login form and that you have to click manually on the register button.
How can I fix that after the click on the a href the page refreshes and that it will use the javascript code so it will show the register form instead of the login form.
$('.register-pass-reset').click(function(){
// Switches the forms
('.form').animate({
height: "toggle",
'padding-top': 'toggle',
'padding-bottom': 'toggle',
opacity: "toggle"
}, "slow");
$('.help-block').remove();
$('.toggle').html($('.toggle').html() == 'Register' ? 'Login' : 'Register');
});
The a href:
<a class="register-pass-reset" href="{{ url('/login') }}">