Last active
February 13, 2019 15:09
-
-
Save MyCueCards/317087bce31e759eb34b775c2114cb68 to your computer and use it in GitHub Desktop.
Using Bootstrap, this is JQuery that will open a modal if a specific line of text is found within the URL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Insert JQuery URL into header. Below is from Google. | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
//Place below code in body of page. It will open the modal by whatever ID is there when the page is ready. | |
$(document).ready(function(){ | |
if(window.location.href.indexOf("sometexthere") > -1) { | |
$("#id").modal(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment