logo
down
shadow

How to prevent background scrolling


How to prevent background scrolling

By : Magnus Nguyen
Date : November 22 2020, 10:31 AM
seems to work fine On a click of a button, I have managed to fade the background but I also want the background to be unscrollable. I have also removed all the pointer events. Here is the class I add and remove on click of the button , try with this
code :
.blur{
position:fixed;
filter: blur(3px);
-webkit-filter: blur(3px);
-moz-filter: blur(3px);
-o-filter: blur(3px);
-ms-filter: blur(3px);
/* Anything blurred should be unclickable */
pointer-events: none;
overflow: hidden;
}


Share : facebook icon twitter icon
CSS: prevent background from scrolling

CSS: prevent background from scrolling


By : jbassen
Date : March 29 2020, 07:55 AM
help you fix your problem
sorry, can't make the code public
Prevent background scrolling with t&c's box open

Prevent background scrolling with t&c's box open


By : Sharan
Date : March 29 2020, 07:55 AM
This might help you I couldn't find the css selector "modal-open" on your website but maybe something like this would work?
Replace your example code with this.
code :
jQuery(document).ready(function ($) {
    if($('#tlight').length){
        $('body').css('overflow', 'hidden');
    } 
});
Prevent background scrolling in background

Prevent background scrolling in background


By : user2451226
Date : March 29 2020, 07:55 AM
it helps some times If you mean you want to prevent scrolling entire document body, then your code won't achieve this result on latest iOS Safari. This is because Apple is really stubborn about blocking this option for developers for some reason. But there is one way to do it, which I tested many times:
On block, save current var offsetTop = window.scrollTop Set in css body: {position: fixed} Call using JS: document.body.scrollTo(0, -offsetTop)
How can I prevent background scrolling in IOs?

How can I prevent background scrolling in IOs?


By : user3150687
Date : March 29 2020, 07:55 AM
like below fixes the issue I just found the solution myself.
Disable scrolling on the body or in the element you want by using event.preventDefault(); on a touchmove event listener. After doing that, you can allow scrolling on the element you need by using event.stopPropagation(); on a touchmove event listener. If you need to keep IOs from scrolling the elements in the background of the scrollable element (after it finnished it own scrolling) just do event.stopPropagation(); first and then (if the element is full scrolled) do event.preventDefault();.
fancyBox v2: How do I prevent background scrolling in Chrome?

fancyBox v2: How do I prevent background scrolling in Chrome?


By : Cuongxoi
Date : March 29 2020, 07:55 AM
Hope this helps I'm using fancyBox v2.1.4. In Chrome it's allowing scrolling of the main page when the fancyBox is open. , this code worked for me:
Related Posts Related Posts :
  • Keep server session alive automatically based on activity / input, using JQuery
  • jQuery load() taking a long time
  • Change / Exchange values in textboxes on text change in jquery
  • Unslider arrow code overriding slider options
  • what is the traditional way of sorting search results?
  • Do the action when the DIV comes in the display area of the browser with jQuery
  • jQuery slideshow overlapping CSS ribbon
  • JQuery animate function dont work
  • problems charts jquery highcharts
  • How to reset the select box values in Jquery sumoselect Multi select plugin
  • css absolute position on top of another element
  • How use jQuery String variable in html body
  • Get a row from table in view on modal bootstrap using codeigniter
  • How to make the effect of a div that covers an other div when scrolling?
  • Data binding using a button
  • How do i replace all dot in string to Underscore?
  • grab non-sibling element with jquery
  • Select a word and click it
  • Trigger modal instead redirect to /users/sign_in path, Rails 4 with devise
  • Combining Parent theme JS and CSS
  • Angular ui-grid - DropDown Selection shows Id
  • jquery addclass when there is content on body
  • JQUERY : CSS does not apply to dynamically created elements
  • Bootstrap multiselect dropdown checkbox not working on paginated table
  • JQuery scroll to dynamic id
  • Jquery first time tried ajax
  • Disable the link on the active tab (Bootstrap)
  • How to handle this validation when a div is added?
  • how to show/hide and check/uncheck checkboxes dynamically inside kendo grid
  • Conditional parameters for AJAX function
  • Jquery add class to input checkbox field
  • Bootstrap countdown timer Jquery
  • Open the closest modal of jQuery clicked element
  • change background color of specific button on click
  • Can I create link as post to 3rd party site and open in new tab?
  • ID is 'undefined' using .each()
  • Using .each() for targeting each child differently in Jquery
  • How to return data from functions in function
  • Execute this jquery only when viewport is bigger than
  • Bootbox showing white box behind dialog
  • Toggle multiple classes with prevAll(), nextAll(), slice(), and duplicate classes... better way?
  • Show/hide list items and add more/less link
  • Going through all occurences of class on slider change
  • Call jQuery valid() without updating the screen
  • hide and show ActionLink and save data in database - MVC
  • Pass each object in JSON array to query
  • Toggling content div on one-page site with jQuery
  • Foundation Equalizer is setting height to inherit?
  • carousel navigation each function
  • changing color of text color with input slider
  • jquery: filter using AND OR in selector
  • Call a function If any Item is chosen From select box , After Dom update
  • Target class within a jquery object
  • How to scroll a web page with fixed navigation bar just before arrive to a section or div?
  • How to add a class name to a specific selector
  • How can I disable previous/next in OwlCarousel2 if there aren't enough items to scroll?
  • How to pass products and quantities to ASP.NET MVC4 Web API from form submit
  • jQuery css3 attribute not working
  • WordPress One Page Style Menus Scrolling
  • jquery.unobtrusive-ajax.js is not capturing the Submit event
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org