npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jquery.event.dragscroll

v1.0.0

Published

Dragscroll allows you to create numerous inertia scrolling areas all with their own properties.

Downloads

21

Readme

jquery.event.dragscroll

Summary

Use this plugin to add scrolling to touch enabled web pages. It is compatible with jQuery 1.7.0+ and passes JSLint.

Code style is as presented in Single Page Web Applications - JavaScript end-to-end which is available from Amazon and directly from Manning. The standard was last updated in December 2016.

Browser Support

Works with iOS5+ (Stock browser) and Android 3.2+ (Chrome) and of course all modern desktop browsers (IE9+ and later version of Chrome, Safari, and Firefox.

IE9 may require edge settings in the head section:

  <meta http-equiv="X-UA-Compatible" content="IE=edge" />

Examples

Basic use

  $(function (){
    var scroll_obj = $.makeDragScrollObj({ _$scroll_box_ : $( 'body' ) });
 
    $( 'body' )
      .on( 'udragend',   scroll_obj._onendHandler_   )
      .on( 'udragmove',  scroll_obj._onmoveHandler_  )
      .on( 'udragstart', scroll_obj._onstartHandler_ )
      ;
  });

Option _prop_key_

Set this property to determine how the drag event propagates.

`_stop_now_`: Prevent default behavior and stop drag event from
  propagating immediately.
      event_obj.preventDefault();
      event_obj.stopImmediatePropagation();

'_stop_all_': Prevent default behavior and stop drag event from
  propagating.
      event_obj.preventDefault();
      event_obj.stopPropagation();

'_stop_default_': Prevent default behavior.

default : Does not affect event behavior.

Option _do_scroll_x_

Support x scrolling. Default false.

Option _do_scroll_y_

Support y scrolling. Default true.

Option _drag_ratio_

Affects scroll "friction." Default is 0.001.

Option _on_stop_fn_

Function executed when scrolling stops. The function receives the _$scroll_box_ as the argument.

Release Notes

Copyright (c)

2015-2017 Michael S. Mikowski (mike[dot]mikowski[at]gmail[dotcom])

License

Dual licensed under the MIT or GPL Version 2 http://jquery.org/license

Version 0.9.0

First public npm release.

Version 0.9.1

Added the _on_stop_fn_ callback which is fired after scroll animation stops.

Version 0.9.3

Updated docs.

Version 1.0.0

Added support for the body element, update docs, README, and demo.

Contribute!

If you want to help out, like all jQuery plugins this is hosted at GitHub. Any improvements or suggestions are welcome! You can reach me at mike[dot]mikowski[at]gmail[dotcom].

If you are considering replacing jQuery with a "framwork", please consider if you really want an SPA framework.

End