is there way have if go example: http://www.example.org/modal.html?openmodal=true modal open onload if go http://www.example.org/modal.html modal won't open onload?
http://getbootstrap.com/javascript/#modals tells $('#mymodal').modal('show')
opens window manually. modal got id="mymodal", try this:
//from: https://stackoverflow.com/questions/3788125/jquery-querystring function querystring(key) { var re=new regexp('(?:\\?|&)'+key+'=(.*?)(?=&|$)','gi'); var r=[], m; while ((m=re.exec(document.location.search)) != null) r.push(m[1]); return r; } var querystring = querystring('modal'); if (querystring.length && querystring[0]==='true' ) {$('#mymodal').modal('show');}
this open modal when ?modal=true has been set.
reference: jquery querystring