Skip to content

Instantly share code, notes, and snippets.

@amdest
Created June 15, 2012 10:35
Show Gist options
  • Save amdest/2935783 to your computer and use it in GitHub Desktop.
Save amdest/2935783 to your computer and use it in GitHub Desktop.
Twitter Bootstrap modal auto-width
// https://github.com/twitter/bootstrap/issues/675#issuecomment-6184243
$('#feedback-modal').modal({
backdrop: true,
keyboard: true
}).css({
'width': function () {
return ($(document).width() * .9) + 'px';
},
'margin-left': function () {
return -($(this).width() / 2);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment