Revisions
-
Drew Johnston revised this gist
Jun 13, 2012 . No changes.There are no files selected for viewing
-
Drew Johnston revised this gist
Jun 13, 2012 . 1 changed file with 0 additions and 6 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 @@ -13,11 +13,5 @@ $('[data-toggle="modal"]').click(function(e) { }).success(function() { $('input:text:visible:first').focus(); }); } }); }); -
Drew Johnston revised this gist
Jun 13, 2012 . 1 changed file with 6 additions and 0 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 @@ -13,5 +13,11 @@ $('[data-toggle="modal"]').click(function(e) { }).success(function() { $('input:text:visible:first').focus(); }); } }); // Delete the modal window on close $('[data-dismiss="modal"]').click(function(e) { e.preventDefault(); $('.modal').remove(); }); }); -
Drew Johnston revised this gist
May 31, 2012 . 1 changed file with 1 addition and 1 deletion.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 +1 @@ <a href="/url/to/load/modal_window.htm" data-toggle="modal">link</a> -
Drew Johnston revised this gist
Feb 1, 2012 . 3 changed files with 6 additions and 6 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 @@ -2,9 +2,9 @@ $(document).ready(function() { // Support for AJAX loaded modal window. // Focuses on first input textbox after it loads the window. $('[data-toggle="modal"]').click(function(e) { e.preventDefault(); var href = $(this).attr('href'); if (href.indexOf('#') == 0) { $(href).modal('open'); } else { 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 +1 @@ <a herf="/url/to/load/modal_window.htm" data-toggle="modal">link</a> 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,11 +1,11 @@ <div class="modal-header"> <a class="close" data-dismiss="modal">×</a> <h3>Modal header 2</h3> </div> <div class="modal-body"> <p>One body...</p> </div> <div class="modal-footer"> <a class="btn btn-primary">Save Changes</a> <a class="btn" data-dismiss="modal">Close</a> </div> -
Drew Johnston revised this gist
Feb 1, 2012 . 3 changed files with 17 additions and 16 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,16 +1,17 @@ $(document).ready(function() { // Support for AJAX loaded modal window. // Focuses on first input textbox after it loads the window. $('.to-modal').click(function(e) { e.preventDefault(); var href = $(e.target).attr('href'); if (href.indexOf('#') == 0) { $(href).modal('open'); } else { $.get(href, function(data) { $('<div class="modal" >' + data + '</div>').modal(); }).success(function() { $('input:text:visible:first').focus(); }); } }); }); 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 +1 @@ <a herf="/url/to/load/modal_window.htm" class="to-modal">link</a> 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,11 +1,11 @@ <div class="modal-header"> <a href="#" class="close modal-close">×</a> <h3>Modal header 2</h3> </div> <div class="modal-body"> <p>One body...</p> </div> <div class="modal-footer"> <input class="btn btn-primary" type="submit" value="Save Changes" /> <a class="btn modal-close">Close</a> </div> -
Drew Johnston revised this gist
Feb 1, 2012 . 2 changed files with 13 additions and 24 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,11 +1,16 @@ $(document).ready(function() { // Support for AJAX loaded modal window $('.to_modal').click(function(e) { e.preventDefault(); var href = $(e.target).attr('href'); if (href.indexOf('#') == 0) { $(href).modal('open'); } else { $.get(href, function(data) { $('<div class="modal fade" >' + data + '</div>').modal(); }); } }); }); 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,17 +1 @@ <a herf="/url/to/load/modal_window.htm" class="to_modal">link</a> -
Drew Johnston revised this gist
Jan 27, 2012 . 1 changed file with 1 addition and 1 deletion.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 @@ -12,6 +12,6 @@ <body> <!-- Uses btn-model class to indicate an AJAX loaded modal, and data-target as the source --> <a class="btn btn-modal" data-target="modal_window.htm">Launch Modal</a> </body> </html> -
Drew Johnston created this gist
Jan 27, 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,11 @@ $(document).ready(function() { // Support for AJAX loaded modal window $('.btn-modal').click(function() { $.get($(this).attr('data-target'), function(data) { $('#modal_window').html(data); $('#modal_window').modal('show'); }, 'html'); }); }); 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 @@ <html> <head> <script src="js/jquery.min.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/custom.js"></script> <link href="css/bootstrap.css" rel="stylesheet"> <!-- Modal window to load dynamic content --> <div class="modal hide" id="modal_window"></div> </head> <body> <!-- Uses btn-model class to indicate an AJAX loaded modal, and data-target as the source --> <a class="btn btn-modal" data-target="modal_window.html">Launch Modal</a> </body> </html> 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,11 @@ <div class="modal-header"> <a href="#" class="close js-dismiss">×</a> <h3>Modal header 2</h3> </div> <div class="modal-body"> <p>One body...</p> </div> <div class="modal-footer"> <input class="btn primary" type="submit" value="Save Changes" /> <a href="#" class="btn js-dismiss">Close</a> </div>