All Projects → ssorallen → Jquery Scrollstop

ssorallen / Jquery Scrollstop

Licence: unlicense
A jQuery plugin that fires events when scrolling stops and starts.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Jquery Scrollstop

Normalmap.js
normalmap.js is a library for creating simple interactive lighting effects using normal maps.
Stars: ✭ 156 (-1.27%)
Mutual labels:  jquery-plugin, jquery
Jquery jeditable
jQuery edit in place plugin. Extendable via plugin architecture. Plugins for plugin. Really.
Stars: ✭ 1,756 (+1011.39%)
Mutual labels:  jquery-plugin, jquery
Convform
A jQuery plugin that transforms a form into an interactive chat.
Stars: ✭ 141 (-10.76%)
Mutual labels:  jquery-plugin, jquery
Jquery.fbmessenger
Fake Facebook Messenger interactions on an iPhone with a simple jQuery plugin!
Stars: ✭ 130 (-17.72%)
Mutual labels:  jquery-plugin, jquery
Balancedgallery
A balanced photo gallery plugin for jQuery.
Stars: ✭ 158 (+0%)
Mutual labels:  jquery-plugin, jquery
Slide And Swipe Menu
⚡️ A sliding swipe menu that works with touchSwipe library.
Stars: ✭ 135 (-14.56%)
Mutual labels:  jquery-plugin, jquery
Jquery.resizeend
A custom event that fires when a user stops resizing their browser.
Stars: ✭ 155 (-1.9%)
Mutual labels:  jquery-plugin, jquery
Isonscreen
Simple jQuery plugin to determine if an element is within the viewport
Stars: ✭ 115 (-27.22%)
Mutual labels:  jquery-plugin, jquery
Magnificent.js
🔍 Zoom responsively, images & more, w/ jQuery.
Stars: ✭ 153 (-3.16%)
Mutual labels:  jquery-plugin, jquery
Jquery.serializeobject
Encode a set of form elements as a JSON object for manipulation/submission.
Stars: ✭ 149 (-5.7%)
Mutual labels:  jquery-plugin, jquery
Checkboxes.js
☑️ A jQuery plugin that gives you nice powers over your checkboxes.
Stars: ✭ 127 (-19.62%)
Mutual labels:  jquery-plugin, jquery
Viewport.jquery
viewport.jquery - simple but handy jQuery plugin adding methods and CSS selectors to check if element is in certain viewport
Stars: ✭ 156 (-1.27%)
Mutual labels:  jquery-plugin, jquery
Fotorama
A simple, stunning, powerful jQuery gallery.
Stars: ✭ 1,567 (+891.77%)
Mutual labels:  jquery-plugin, jquery
Jquery Confirm
A multipurpose plugin for alert, confirm & dialog, with extended features.
Stars: ✭ 1,776 (+1024.05%)
Mutual labels:  jquery-plugin, jquery
Xzoom
jQuery Zoom Gallery plugin
Stars: ✭ 120 (-24.05%)
Mutual labels:  jquery-plugin, jquery
Jquery Menu Editor
Multilevel Menu Editor for Bootstrap 4.x (Html & Javascript code)
Stars: ✭ 144 (-8.86%)
Mutual labels:  jquery-plugin, jquery
Footer Reveal
A jQuery plugin for easy implementation of the 'fixed/reveal' footer effect. Demo here:
Stars: ✭ 111 (-29.75%)
Mutual labels:  jquery-plugin, jquery
Jquery Rwdimagemaps
Responsive Image Maps jQuery Plugin
Stars: ✭ 1,511 (+856.33%)
Mutual labels:  jquery-plugin, jquery
Image Select
Image Select is an extension of Chosen, a jQuery plugin that makes long, unwieldy select boxes much more user-friendly. It provides image support for Single and Multi select HTML tags.
Stars: ✭ 145 (-8.23%)
Mutual labels:  jquery-plugin, jquery
Metismenu
Related projects
Stars: ✭ 1,904 (+1105.06%)
Mutual labels:  jquery-plugin, jquery

jquery-scrollstop

This plugin fires two events on window when scrolling starts and stops: scrollstart and scrollstop.

Installation

This library is released on NPM as jquery-scrollstop:

npm install jquery-scrollstop

Example

The example shows a small box in the upper left that says "SCROLLING" and colors the body different colors when scrolling: https://ssorallen.github.io/jquery-scrollstop/

Usage

scrollstart fires after the first scroll event and won't fire again until after a scrollstop event is fired.

scrollstop fires after no scroll events have fired for 250 milliseconds.

$(window)
  .on("scrollstart", function() {
    // Paint the world yellow when scrolling starts.
    $(document.body).css({background: "yellow"});
  })
  .on("scrollstop", function() {
    // Paint it all green when scrolling stops.
    $(document.body).css({background: "green"});
  })

Configuration

latency

latency is the minimum time between the last scroll event and when the scrollstop event fires. Set $.event.special.scrollstop.latency to the desired number of milliseconds (default: 250).

// Configure time between final scroll event and
// `scrollstop` event to 650ms (default is 250ms).
$.event.special.scrollstop.latency = 650;
latency per element

Latency can be configured per-element by passing options when the event listener is bound. If multiple event listeners are bound to the same element, only the data from the first event listener will set the configuration.

// Configure latency to 650ms for #scrolling-div
$("#scrolling-div").on("scrollstop", {latency: 650}, function() { ... });

jQuery Version Support

The plugin is tested in jQuery 1.2.3+ and jQuery 2.0.3+.

Attribution

Originally code taken from James Padolsey's blog: http://james.padolsey.com/javascript/special-scroll-events-for-jquery/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].