This will completely disable scrolling:
$('html, body').css({
overflow: 'hidden',
height: '100%'
});
To restore:
$('html, body').css({
overflow: 'auto',
height: 'auto'
});
Tested it on Firefox and Chrome.
More Related Contents:
- Can I change the scroll speed using css or jQuery?
- Activate CSS3 animation when the content scrolls into view
- How to change the element of another div by clicking and hovering on an element of a different div
- Hide/Show div on specific page with jquery
- Issue with a design when content increase [closed]
- How to change color of SVG image using CSS (jQuery SVG image replacement)?
- Firing events on CSS class changes in jQuery
- Prevent BODY from scrolling when a modal is opened
- How do I switch my CSS stylesheet using jQuery?
- How do I get background image size in jQuery?
- Is it possible to use jQuery to get the width of an element in percent or pixels, based on what the developer specified with CSS?
- jquery IE Fadein and Fadeout Opacity
- Remove CSS from a Div using JQuery
- jquery change background color user scroll
- Correct way to animate box-shadow with jQuery
- Changing Body Font-Size based on Font-Family with jQuery
- Differentiate between scroll up/down in jquery? [duplicate]
- How to expand ‘select’ option width after the user wants to select an option
- Get the value of -webkit-transform of an element with jquery
- jQuery/CSS: line-height of “normal” == ?px
- How to hide/remove a DIV when empty
- How to make div follow scrolling smoothly with jQuery?
- Trying to make multiple background images cycle through a slideshow with CSS and JQUERY
- Change the body background image with fade effect in jquery
- CSS3 equivalent to jQuery slideUp and slideDown?
- How add spaces between Slick carousel item
- Fading elements in and out without changing the layout of the page
- Custom CSS to allow chrome textarea resize smaller than initial state?
- Detect user scroll down or scroll up in jQuery [duplicate]
- What is alternative to use after jQuery 1.9 removed .toggle(function,function)?