Skip to content

Instantly share code, notes, and snippets.

View lardawge's full-sized avatar

Larry Sprock lardawge

  • Los Angeles, CA
View GitHub Profile
@lardawge
lardawge / custom.js
Created October 9, 2012 08:17 — forked from drewjoh/custom.js
Dynamic (AJAX) loaded Bootstrap Modal (Bootstrap 2.1)
$(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 url = $(this).attr('href');
if (url.indexOf('#') == 0) {
$(url).modal('open');
} else {