DisableScroll.js
How do I make an disablescroll.js?
What is a disablescroll.js? How do you make a disablescroll.js? This script and codes were developed by Cory Simmons on 04 July 2022, Monday.
DisableScroll.js - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>disableScroll.js</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
DisableScroll.js - Script Codes CSS Codes
@import "nib"
DisableScroll.js - Script Codes JS Codes
/** * $.disablescroll * Author: Josh Harrison - aloof.co * * Disables scroll events from mousewheels, touchmoves and keypresses. * Use while jQuery is animating the scroll position for a guaranteed super-smooth ride! */(function(e){"use strict";function r(t,n){this.opts=e.extend({handleWheel:!0,handleScrollbar:!0,handleKeys:!0,scrollEventKeys:[32,33,34,35,36,37,38,39,40]},n);this.$container=t;this.$document=e(document);this.lockToScrollPos=[0,0];this.disable()}var t,n;n=r.prototype;n.disable=function(){var e=this;e.opts.handleWheel&&e.$container.on("mousewheel.disablescroll DOMMouseScroll.disablescroll touchmove.disablescroll",e._handleWheel);if(e.opts.handleScrollbar){e.lockToScrollPos=[e.$container.scrollLeft(),e.$container.scrollTop()];e.$container.on("scroll.disablescroll",function(){e._handleScrollbar.call(e)})}e.opts.handleKeys&&e.$document.on("keydown.disablescroll",function(t){e._handleKeydown.call(e,t)})};n.undo=function(){var e=this;e.$container.off(".disablescroll");e.opts.handleKeys&&e.$document.off(".disablescroll")};n._handleWheel=function(e){e.preventDefault()};n._handleScrollbar=function(){this.$container.scrollLeft(this.lockToScrollPos[0]);this.$container.scrollTop(this.lockToScrollPos[1])};n._handleKeydown=function(e){for(var t=0;t<this.opts.scrollEventKeys.length;t++)if(e.keyCode===this.opts.scrollEventKeys[t]){e.preventDefault();return}};e.fn.disablescroll=function(e){!t&&(typeof e=="object"||!e)&&(t=new r(this,e));t&&typeof e=="undefined"?t.disable():t&&t[e]&&t[e].call(t)};window.UserScrollDisabler=r})(jQuery);
Developer | Cory Simmons |
Username | corysimmons |
Uploaded | July 04, 2022 |
Rating | 3 |
Size | 2,327 Kb |
Views | 30,360 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Basic Infinite Scrolling Background | 2,032 Kb |
Extremely Simple Parallax with Stellar.js | 2,848 Kb |
Semantic Nested Navigation | 3,521 Kb |
Lost Grid - SCSS Demo | 5,291 Kb |
Beaker Pour | 2,414 Kb |
Basic Hamburger Menu | 3,024 Kb |
Hamburger Menu Icon | 2,408 Kb |
Single element, pure CSS File Upload | 2,039 Kb |
Oral history typography | 2,948 Kb |
Lost Grid - Stylus Demo | 4,904 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Simple Accordion | Wearebold | 3,683 Kb |
CSS Tooltips | Darylldoyle | 2,599 Kb |
Flip test | Madhes | 1,635 Kb |
Spilled Paint | Darrylhuffman | 3,894 Kb |
Boxes | H3l1um | 2,563 Kb |
Flat UI Button | Honchoman | 2,289 Kb |
SVG Icons Template | Legofsalmon | 2,618 Kb |
Parallax.js | Zmeeey5 | 2,330 Kb |
Prototype Responsive Homepage | Heyitsolivia | 7,677 Kb |
Animating characters with jQuery | 042 | 2,776 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!