L
L
lhav2012-06-19 11:02:22
JavaScript
lhav, 2012-06-19 11:02:22

How to fix parent page of Modal window (Twitter Bootstrap)?

Used by Twitter Bootstrap.
It is necessary to fix (so as not to scroll) the parent page on which the modal window was opened.

By default, it scrolls along with the content of the modal window.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Makave1i, 2012-06-19
@Makave1i

You can do without JS, when opening a modal window, Twitter Bootstrap itself sets the modal-open class for body. It will be enough to add to CSS
.modal-open { overflow: hidden; }

A
Arthur Koch, 2012-06-19
@dudeonthehorse

$('body').css('overflow','hidden');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question