//parameter link the link : https://www.mysite.com?showlogin=true //the script if(window.location.search.indexOf("showlogin") > -1){ jQuery("#modal_trigger").trigger("click"); }