Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
twitter bootstrap modal fluid ... just add .modal-fluid in div with modal id
(function ($) {
$(function () {
function update() {
var width = $(document).width();
var height = $(document).height();
$('.modal-fluid').css({
width: width * 0.8,
marginLeft: -(width * 0.4)
});
$('.modal-fluid .modal-body').css({
maxHeight: (height * 0.8) - 136
});
$('.modal-fluid').each(function () {
$(this).css({
marginTop: -($(this).height() / 2),
});
});
}
$(document).resize(update);
update();
});
}(window.jQuery));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.