-
-
Save aka-z/e9b7b89762de61f790ef06e8b71964ae to your computer and use it in GitHub Desktop.
Revisions
-
MrDys revised this gist
Aug 29, 2012 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,11 @@ /* If you've ever had the need to link directly to an open modal window with Bootstrap, here's a quick and easy way to do it: Make sure your modal has an id: <div class="modal" id="myModal" ... > Then stick this bit of Javascript at at the end of your document: */ $(document).ready(function() { @@ -14,4 +15,6 @@ $(document).ready(function() { }); /* Then you can send people to http://www.website.com/page.html#myModal and it'll load the page with the modal open. */ -
MrDys created this gist
Aug 29, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ If you've ever had the need to link directly to an open modal window with Bootstrap, here's a quick and easy way to do it: Make sure your modal has an id: <div class="modal" id="myModal" ... > Then stick this bit of Javascript at at the end of your document: $(document).ready(function() { if(window.location.href.indexOf('#myModal') != -1) { $('#myModal').modal('show'); } }); Then you can send people to http://www.website.com/page.html#myModal and it'll load the page with the modal open.