< newbie > I've come across an interesting issue with my code. It works perfectly when I use the correct URL:
www.exemple.com/?login
$(document).ready(function(){
function urlparam(){
var url = window.location.href.split('?')[1];
if (url == 'login' ) {
document.getElementById('loginMainContainer').style.display = 'block';
$('.login').triggerHandler('click');
} else if (url == 'signup' ){
document.getElementById('loginMainContainer').style.display = 'block';
$('.signup').triggerHandler('click');
}
}
urlparam()
});
However, when I try to use a URL with additional parameters like (w/ mailchimp):
www.exemple.com/?login&utm_source=App+Accounts&utm_campaign=e94f95d4da-News_promo+email_English_2016
My function doesn't seem to execute properly. Is there a way for me to ignore these extra parameters and still have my function work correctly?
Thanks in advance for any assistance!
< /newbie >