Lock / Unlock Scrolling Of Elements - jQuery lockscroll

File Size: 120 KB
Views Total: 2036
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Lock / Unlock Scrolling Of Elements - jQuery lockscroll

lockscroll is an extremely light jQuery plugin that allows to lock or unlock mouse wheel scroll inside a specific scrollable container or the whole webpage.

See also:

How to use it:

1. Include the jquery.lockscroll.js script after jQuery library and the lickscroll plugin is ready for use.

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="jquery.lockscroll.js"></script>

2. The JavaScript to lock / unloack scrolling of your container or web page temporarily.

// lock
$("#container").click(function() {
  $.lockScroll();
});

// unlock
$("#container").click(function() {
  $.lockScroll(false);
});

This awesome jQuery plugin is developed by edpittol. For more Advanced Usages, please check the demo page or visit the official website.