Skip to content

Instantly share code, notes, and snippets.

View nextroy's full-sized avatar
🏠
Working from home

Supriyo Roy nextroy

🏠
Working from home
View GitHub Profile
@nextroy
nextroy / custom.js
Created June 27, 2012 12:42 — forked from drewjoh/custom.js
Dynamic (AJAX) loaded Bootstrap Modal (Bootstrap 2.0) : Fix for removing the response Modal content
$(document).ready(function() {
// Support for AJAX loaded modal window.
// Focuses on first input textbox after it loads the window.
$('[data-toggle="modal"]').bind('click',function(e) {
e.preventDefault();
var url = $(this).attr('href');
if (url.indexOf('#') == 0) {
$('#response_modal').modal('open');
} else {