jQuery to look for modal parameter

0 votes
90 views
added Dec 15, 2017 in jQuery by LC Marshal Captain (25,770 points)
edited Jul 5, 2018 by LC Marshal
//parameter link
the link : https://www.mysite.com?showlogin=true
 
//the script
if(window.location.search.indexOf("showlogin") > -1){
  jQuery("#modal_trigger").trigger("click");
}
lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...