Just proxy the modal-open
class for Bootstrap like this:
.bs-modal-open {
overflow: hidden;
}
.bs-modal-open .modal {
overflow-x: hidden;
overflow-y: auto;
}
// or using sass …
.bs-modal-open {
@extend .modal-open;
}
Add/remove the bs-modal-open
class to the body when opening/closing a BS modal:
$('.bs-modal')
.on('show.bs.modal', function (e) {
$('body').addClass('bs-modal-open');
})
.on('hidden.bs.modal', function (e) {
$('body').removeClass('bs-modal-open');
});
Finally add the bs-modal
class to each of your BS modals:
<div class="modal bs-modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
…
</div>
Related Posts:
- Bootstrap Dropdown menu is not working
- Adding images to a Bootstrap Carousel with AJAX
- JavaScript Loading Screen while page loads
- Bootstrap Dropdown menu is not working
- Bootstrap Dropdown menu is not working
- TypeError: $(…).modal is not a function with bootstrap Modal
- bootstrap 3 navbar collapse button not working
- How to center image in carousel
- Can Twitter Bootstrap alerts fade in as well as out?
- Automatically decrease font size for long words
- Modify Custom Field in Media Library using JavaScript
- Twitter Bootstrap Use Collapse in Custom Post Type
- How to properly add Bootstrap and JQuery Javascripts?
- How to Dynamically Load Content Into Body of Bootstrap Modal Window?
- Using bootstrap-slider and bootstrap-switch in wordpress admin panel
- Is it OK combined wp-include js, jquery, css? [closed]
- jQuery Validation plugin and Bootstrap 4 CSS classes
- Getting click on item to open closest relevant element (popup) with jQuery
- jQuery for Fade Preload Causes My Site Favicon to Disappear from Tab of Browser
- Site images are fixed in front of my site content [closed]
- Bootstrap with separate js File
- change the icon of a custom post type in WordPress to use twitter boostrap
- How to set time delay in javascript
- Change Background color (css property) using Jquery
- JavaScript: filter() for Objects
- JavaScript runtime error: ‘$’ is undefined
- Use images like checkboxes
- ChangeDate – Date Picker Bootstrap
- How to make html table vertically scrollable
- Why is the jquery script not working?
- TypeError: $(…).DataTable is not a function
- How to get client’s IP address using JavaScript?
- Simple throttle in JavaScript
- Enable & Disable a Div and its elements in Javascript
- The ‘describe’ keyword in javascript
- How to open a Bootstrap modal window using jQuery?
- Closing Bootstrap modal onclick
- How to set “style=display:none;” using jQuery’s attr method?
- Add tinymce buttons to caption textarea in media uploader
- Move WordPress native javascript to bottom of page?
- RequireJS in custom theme. Working Example
- How to handle multiple instance of “send_to_editor” js function
- Media manager multiple selection
- Trying to get single posts to load on the front page via ajax
- Stylizing external SVG files with jQuery and CSS
- Ajax not firing properly using Firefox, but works in Chrome
- wp_enqueuescript won’t load in footer even with true value set?
- Execution of JavaScript on save post
- Is placing stuff in page text edit window bad form?
- trigger(‘change’) not working
- Add colorpicker to featured image
- Gravity Forms not loading under https, jQuery is not defined
- Gravity list field override and adding javascript [closed]
- Add a Fancybox automatically to post type “post” images
- Enqueuing javascript files
- WordPress customizer refresh screen after save
- Creating multiple enclosing shortcodes and fixing JS issues on click
- Can’t load a class into WordPress post editor’s content field
- Slider loading issue
- Add a class to posts in increments of 2
- How to make an WordPress element sticky? [closed]
- I want to import my Json file into a custom made display-modal. How do i link my Json file?
- WordPress Multiple Navigation bars
- show/hide div with simple jQuery script [closed]
- Searching multiple tags and adding jQuery dependant script onto page template?
- TinyMCE 4 remove/add attributes for all images
- Javascript stopped working [closed]
- Why load JS through the CMS framework? [duplicate]
- url – ajax loaded but no JS
- Loading scripts on a single page plants the script in the footer
- Getting a ‘slide down’ js panel implemented within WP
- Problem Implementing parallax in header of bp-default theme
- How to keep HTML form field that is conditional hidden with javasript hidden after page reload?
- Accessing javascript in multiple files [closed]
- Issues loading Jquery on WordPress website
- Required radio button does not validate in form, when clicked through Javascript/jQuery
- Blur.js with WordPress – Enqueued, but server not finding file
- Parse wordpress blog data using json api and ajax
- A carousel slideshow plugin in JavaScript
- Best way to add some custom javascript using jquery to a child theme
- Modal dialog under the backdrop
- Change the version of default style.css in wordpress
- Add JQuery As Code Snippet
- How Do I change Markup of a link in WordPress
- How can publish my bootstrap created table ( huge amount of data) on my word-press theme?
- How to create a mobile menu full screen overlay using Understraps Bootstrap 4 theme
- Lightbox scroll page down on iPhone
- Get ajaxForm response value
- JQuery toggle in Visual Composer
- Adding scripts before plugins scripts
- jQuery search function not running in WordPress but running locally (fiddle)
- Masonry – Can’t Find Variable imagesLoaded
- How to update scrollbar when using Jetpack’s Inifnite Scroller?
- Element works, but not on wordpress site [duplicate]
- Carousel Hover Image
- How do I add Javascript and CSS files into WordPress?
- How to Javascript/jQuery
- can’t make jQuery work (change image on time interval) [closed]
- shortcode execution when the page is opened
- Sending jQuery variable to php function