{"_id":"jquery.kinetic","_rev":"8-384441ee3c121be37f7d7b36e241db31","name":"jquery.kinetic","description":"adds smooth drag scrolling with gradual deceleration to containers","dist-tags":{"latest":"2.2.4"},"versions":{"2.1.0":{"name":"jquery.kinetic","version":"2.1.0","description":"adds smooth drag scrolling with gradual deceleration to containers","homepage":"http://the-taylors.org/jquery.kinetic","author":{"name":"Dave Taylor"},"license":"MIT","devDependencies":{"grunt":"0.4.x","wd":"0.x.x","vows":"0.7.x","underscore":"1.7.x","grunt-vows":"0.4.x","grunt-bump":"0.3.x","grunt-string-replace":"0.2.x","grunt-contrib-jshint":"0.10.x","grunt-contrib-qunit":"0.5.x","grunt-contrib-uglify":"0.5.x","grunt-contrib-watch":"0.6.x"},"scripts":{"test":"grunt --verbose"},"gitHead":"0883c0427e2005cb9a03fa7626a266d15b55d813","_id":"jquery.kinetic@2.1.0","_shasum":"d5c7659ac4bb1ed50b8f690069db19100a58e712","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.6","_npmUser":{"name":"davetayls","email":"dave.taylor@pogokid.com"},"maintainers":[{"name":"davetayls","email":"dave.taylor@pogokid.com"}],"dist":{"shasum":"d5c7659ac4bb1ed50b8f690069db19100a58e712","tarball":"https://registry.npmjs.org/jquery.kinetic/-/jquery.kinetic-2.1.0.tgz","integrity":"sha512-k7cWFNbLaf1qCEfvHroHtwgVBeotmM0QllpvMwyhsCP0vUz93Ycx7/PAAJrwtzTQdzfZ786GhCXPmayjHCJxSA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBtu2WiziBE9pFzgooWg9xFoPdCFfQ3ysZ2e4cY1qaWXAiEAhtMqx4GE/Zykyke2GGOTjI4R5XrnsB95nKULkZi5z+4="}]}},"2.1.1":{"name":"jquery.kinetic","version":"2.1.1","description":"adds smooth drag scrolling with gradual deceleration to containers","homepage":"http://the-taylors.org/jquery.kinetic","author":{"name":"Dave Taylor"},"license":"MIT","devDependencies":{"grunt":"0.4.x","wd":"0.x.x","vows":"0.7.x","underscore":"1.7.x","grunt-vows":"0.4.x","grunt-bump":"0.3.x","grunt-string-replace":"0.2.x","grunt-contrib-jshint":"0.10.x","grunt-contrib-qunit":"0.7.x","grunt-contrib-uglify":"0.5.x","grunt-contrib-watch":"0.6.x"},"scripts":{"test":"grunt --verbose"},"gitHead":"a01bc474dffeee4624653e7c89fe8cd0906498d4","_id":"jquery.kinetic@2.1.1","_shasum":"14bfa4f5948998f9e83e4e9c067224e058ea90f5","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.6","_npmUser":{"name":"davetayls","email":"dave.taylor@pogokid.com"},"maintainers":[{"name":"davetayls","email":"dave.taylor@pogokid.com"}],"dist":{"shasum":"14bfa4f5948998f9e83e4e9c067224e058ea90f5","tarball":"https://registry.npmjs.org/jquery.kinetic/-/jquery.kinetic-2.1.1.tgz","integrity":"sha512-pfbO66t102yYaLdaLcjLILQSDbrfEd79SzXB+zpIR/N5yBfd2x8z2ndv9WWY0iyU/jRKCbkgoOk3w8nLs80lMA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/ud3CSbTpOH1RxazSqxOGDHYs4CJnNgmNUTooz34AFwIhAM5WHm7KtcHS0+fjbdKsedHBZxRZ8k66PzEOHCoWX9zB"}]}},"2.2.2":{"name":"jquery.kinetic","version":"2.2.2","description":"adds smooth drag scrolling with gradual deceleration to containers","homepage":"https://davetayls.me/jquery.kinetic","author":{"name":"Dave Taylor","url":"https://davetayls.me"},"scripts":{"test":"grunt --verbose","release":"grunt release"},"main":"jquery.kinetic.js","license":"MIT","devDependencies":{"grunt":"^1.0.1","grunt-bump":"^0.8.0","grunt-cli":"^1.2.0","grunt-contrib-jshint":"^1.1.0","grunt-contrib-qunit":"^2.0.0","grunt-contrib-uglify":"^3.0.1","grunt-contrib-watch":"^1.0.0","grunt-string-replace":"^1.3.1","grunt-vows":"0.4.x","underscore":"^1.8.3","vows":"^0.8.1","wd":"^1.4.0"},"gitHead":"e24552202a11593cf3570f4ad0acdc94cf2cb6e3","_id":"jquery.kinetic@2.2.2","_npmVersion":"5.3.0","_nodeVersion":"8.1.4","_npmUser":{"name":"davetayls","email":"dave.taylor@pogokid.com"},"dist":{"integrity":"sha512-ZG5QM8kQwozt67EdvAzsG7C0EL9NzCnEioQE7/Jb6uUY6q/jYuUaz+gXAoy5/RdBp1vhcscjUAzUpu+8vIbKOw==","shasum":"dc4416493fac9ba47d5727e203c19ee6544fd5e9","tarball":"https://registry.npmjs.org/jquery.kinetic/-/jquery.kinetic-2.2.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsOHkr1PrSYfOKiUGpO0of6Ye8zfA+WTm7gMzWOIKWSQIhAOtcS4FjDQoIuNKvhAcHj98y2mrKQFnkHCVoQNahiWwd"}]},"maintainers":[{"name":"davetayls","email":"dave.taylor@pogokid.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jquery.kinetic-2.2.2.tgz_1503519956477_0.5507423966191709"}},"2.2.3":{"name":"jquery.kinetic","version":"2.2.3","description":"adds smooth drag scrolling with gradual deceleration to containers","homepage":"https://davetayls.me/jquery.kinetic","author":{"name":"Dave Taylor","url":"https://davetayls.me"},"scripts":{"test":"grunt --verbose","release":"grunt release"},"main":"jquery.kinetic.js","license":"MIT","devDependencies":{"grunt":"^1.0.1","grunt-bump":"^0.8.0","grunt-cli":"^1.2.0","grunt-contrib-jshint":"^1.1.0","grunt-contrib-qunit":"^2.0.0","grunt-contrib-uglify":"^3.0.1","grunt-contrib-watch":"^1.0.0","grunt-string-replace":"^1.3.1","grunt-vows":"0.4.x","underscore":"^1.8.3","vows":"^0.8.1","wd":"^1.4.0"},"gitHead":"441b5480d3175050fec646a1c7abe91f029e12f5","_id":"jquery.kinetic@2.2.3","_npmVersion":"5.3.0","_nodeVersion":"8.1.4","_npmUser":{"name":"davetayls","email":"dave.taylor@pogokid.com"},"dist":{"integrity":"sha512-krFXsK09IYvzJWirhRpzxbI7DuOyrLlaHTB0zU0LyCEMO+XUYYMaEeNUTL5axdC9Kb3rV6M+3JpyrTjs5ts6AA==","shasum":"727725515192e4512d5abde245e3e7ba5a304582","tarball":"https://registry.npmjs.org/jquery.kinetic/-/jquery.kinetic-2.2.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHKq2wQfGQFbrU2ax5pbZ4gZwFDzT+GvGiHG4mjtjvfxAiAaMDxlzL23/mhqk/WJQ7EWsZE8Yj5VRi7HjWudqUMvVw=="}]},"maintainers":[{"name":"davetayls","email":"dave.taylor@pogokid.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jquery.kinetic-2.2.3.tgz_1503520242991_0.5922481804154813"}},"2.2.4":{"name":"jquery.kinetic","version":"2.2.4","description":"adds smooth drag scrolling with gradual deceleration to containers","homepage":"https://davetayls.me/jquery.kinetic","author":{"name":"Dave Taylor","url":"https://davetayls.me"},"scripts":{"test":"grunt --verbose","release":"grunt release"},"main":"jquery.kinetic.js","license":"MIT","devDependencies":{"grunt":"^1.0.1","grunt-bump":"^0.8.0","grunt-cli":"^1.2.0","grunt-contrib-jshint":"^1.1.0","grunt-contrib-qunit":"^2.0.0","grunt-contrib-uglify":"^3.0.1","grunt-contrib-watch":"^1.0.0","grunt-string-replace":"^1.3.1","grunt-vows":"0.4.x","underscore":"^1.8.3","vows":"^0.8.1","wd":"^1.4.0"},"gitHead":"2de574e323e06b6c449bd3e2028a66e12d8f77d4","_id":"jquery.kinetic@2.2.4","_npmVersion":"5.3.0","_nodeVersion":"8.1.4","_npmUser":{"name":"davetayls","email":"dave.taylor@pogokid.com"},"dist":{"integrity":"sha512-hbbMGpSZWoYpGUWMGIyIEpfpeW/xnXkCtwK+VB82VE0TZjTyFfAX6ZVRa/ZL2pyn9b2g8b36hdm79cPHVlHkvQ==","shasum":"a3f66d7565aff507be43a104259b34bcbffaff4f","tarball":"https://registry.npmjs.org/jquery.kinetic/-/jquery.kinetic-2.2.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEP1BWg7Hp/Xj7TP7fkRRB3bnRcftoN4690G/uNP8B3iAiAY+UwQ/f2ol5m28pCOV65wCVthECQWcHhh8PodcMKSTA=="}]},"maintainers":[{"name":"davetayls","email":"dave.taylor@pogokid.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jquery.kinetic-2.2.4.tgz_1505025571372_0.8056998534593731"}}},"readme":"jQuery.kinetic\n==============\nDave Taylor <http://davetayls.me>\nThe MIT License (MIT)\n\n> This code has been pretty stable for a while (with it's few restrictions) and so am not actively making changes. If you want to improve it in any way feel free to submit a pull request (with tests) and we will merge in any that make sense and don't add bloat to what is a simple plugin.\n\nMaster: [![Build Status](https://secure.travis-ci.org/davetayls/jquery.kinetic.png?branch=master)](http://travis-ci.org/davetayls/jquery.kinetic)\n\nAll branches: [![Build Status](https://secure.travis-ci.org/davetayls/jquery.kinetic.png)](http://travis-ci.org/davetayls/jquery.kinetic)\n\njQuery.kinetic is a simple plugin which adds smooth drag scrolling with\ngradual deceleration to containers.\n\nNB. [@dzek69](https://github.com/dzek69) has created a version of this plugin without the dependency on jQuery: <https://github.com/dzek69/vanilla.kinetic>\n\n## Installation\n\n### Bower\n\n\t$ bower install jquery.kinetic --save\n\n### npm\n\n\t$ npm install jquery.kinetic\n\n### Script tag\n\nYou can add the script to the page.\n\n\t<script src=\"jquery.kinetic.js\"></script>\n\n## Major new release 2.0 has BREAKING CHANGES\n\nSee release history below for details.\n\n## Compatibility\n\nThis plugin works with [jQuery](http://jquery.com) and\n[Zepto](http://zeptojs.com/)\n\n### Browsers ###\n\n- ie: 7,8,9\n- firefox: 3.6,4,5\n- chrome: 13\n- safari: 5\n- iOS Safari: 4\n\n## Demos\nTake a look at a demo on <http://davetayls.me/jquery.kinetic>.\n\nFiltering Clickable elements\n---\n\nIf you need to allow events to be passed through the wrapper. For example to allow clicking on a link or an input then you can use `filterTarget` like so.\n\n```javascript\n$('#wrapper').kinetic({\n    filterTarget: function(target, e){\n        if (!/down|start/.test(e.type)){\n            return !(/area|a|input/i.test(target.tagName));\n        }\n    }\n});\n```\n\n## Options\n\n    cursor          {string}    default: move   Specify the cursor to use on the wrapper\n    slowdown        {number}    default: 0.9    This option affects the speed at which the scroll slows\n    threshold       {number|function(target, e)}    default: 0   This is the number of pixels the mouse needs to move before the element starts scrolling\n    x               {string}    default: true   Toggles movement along the x axis\n    y               {string}    default: true   Toggles movement along the y axis\n    maxvelocity     {number}    default: 40     This option puts a cap on speed at which the container\n                                                can scroll\n    throttleFPS     {number}    default: 60     This adds throttling to the mouse move events to boost\n                                                performance when scrolling\n    triggerHardware {boolean} false             This adds css to the wrapper which\n                                                will trigger iOS to use hardware acceleration\n    invert          {boolean}   default: false  Invert movement direction\n\n    filterTarget    {function(target)}          Return false from this function to\n                                                prevent capturing the scroll\n\n    movingClass     {object}\n        up:         {string}    default: 'kinetic-moving-up'\n        down:       {string}    default: 'kinetic-moving-down'\n        left:       {string}    default: 'kinetic-moving-left'\n        right:      {string}    default: 'kinetic-moving-right'\n\n    deceleratingClass {object}\n        up:         {string}    default: 'kinetic-decelerating-up'\n        down:       {string}    default: 'kinetic-decelerating-down'\n        left:       {string}    default: 'kinetic-decelerating-left'\n        right:      {string}    default: 'kinetic-decelerating-right'\n\n    Listeners:  All listeners are called with:\n                - this = the instance of the Kinetic class\n\n    moved       {function()}           A function which is called on every move\n    stopped     {function()}           A function which is called once all\n                                               movement has stopped\n    selectStart {function()}           A function which is called on user try to drag (select text),\n                                               return false to prevent selection when dragging\n\n    Methods:    You can call methods by running the kinetic plugin\n                on an element which has already been activated.\n\n                eg  $('#wrapper').kinetic(); // activate\n                    $('#wrapper').kinetic('methodname', options);\n\n    start       Start movement in the scroll container at a particular velocity.\n                This velocity will not slow until the end method is called.\n\n                The following line scrolls the container left.\n                $('#wrapper#).kinetic('start', { velocity: -30 });\n\n                The following line scrolls the container right.\n                $('#wrapper#).kinetic('start', { velocity: 30 });\n\n                The following line scrolls the container diagonally.\n                $('#wrapper#).kinetic('start', { velocity: -30, velocityY: -10 });\n\n    end         Begin slowdown of any scrolling velocity in the container.\n                $('#wrapper#).kinetic('end');\n\n    stop        Stop the scrolling immediately\n\n    detach      Detach listeners and functionality from the wrapper\n\n    attach      Re-attach listeners and functionality previously detached using\n                the detach method\n\nAdd your own methods\n--------------------\n\nThere are some example methods in the `extra-methods` folder. You can also add your own.\n\n\t$.Kinetic.prototype.do = function(options){\n\t  // this -> instance of Kinetic\n\t  // this.settings -> get current settings\n\t  // options -> options passed in from call\n\t};\n\t\n\t// use the method\n\t$('#elem').kinetic('do', { options });\n\nHack the core\n-------------\n\nYou can now hook in to the core functionality to make changes.\n\n    var _start = $.Kinetic.prototype.start;\n    $.Kinetic.prototype.start = function(options){\n   \t  // -> do something\n   \t  _start.apply(this, arguments);\n    };\n\n\nRunning the tests\n-------\n\nThe test suite uses grunt's server and qunit functionality. The tests are being built up\nbut currently cover the core functionality. This runs all qUnit Html specs in the\n`/test/specs` folder.\n\n- grunt `npm install -g grunt`\n- install devDependencies `npm install` from the root of the source\n\nThen run from the root of the source\n\n    $ grunt\n\n### Manual tests\n\nThere are manual tests as html files within the `/test` folder.\n\nReleasing a new version\n-----------------------\n\nReleasing a small fix or change. The following will update the patch version\nnumber.\n\n    $ grunt release\n    \nReleasing a potentially breaking feature. The following will update the minor\nversion number.\n\n    $ grunt release:minor\n\nChanges\n-------\n### 2.2.2\n - Added main property to package.json (@michaelsouellette) https://github.com/davetayls/jquery.kinetic/pull/105\n\n### 2.2.1\n - Added `selectStart` option and allow selection when `_useTarget` returns false (@tsaikd) https://github.com/davetayls/jquery.kinetic/pull/84\n - Added `invert` option (@tsaikd) https://github.com/davetayls/jquery.kinetic/pull/84\n \n### 2.1.0\n - Added `threshold` option (@UziTech) https://github.com/davetayls/jquery.kinetic/pull/84\n \n### 2.0.6\n - Fix touch and mouse bindings so that an external pointing device can be used with a touchscreen device.\n\n### 2.0.5\n - Fix detach scroll event for touch devices (@Jaemu)\n\n### 2.0.4\n - Fix the useTarget call to include the event as per the example in the readme for ignoring scroll events. (@mooreOn)\n\n### 2.0.3\n - only prevent drag and drop if element is usable target (@andrew-pause)\n\n### 2.0.1\n\n - changes to allow attaching to `<body>` with `$('body').kinetic()` #61\n\n### 2.0\n\nAfter several years, this plugin has had a major refactor. Big thanks to (@skovhus) for helping with this rewrite. Here's what has happened.\n\n- rewrite of plugin to an OO plugin\n- **BREAKING CHANGES**\n  - call methods are now attached to the `$.Kinetic.prototype` and have\n    slightly different arguments (see docs above)\n  - no more $.kinetic namespace\n  - `Kinetic` constructor is attached to $.Kinetic\n  - `$('#wrapper').data('kinetic-settings')` has been removed in favour of\n    `instance = $('#wrapper').data('kinetic'); settings = instance.settings`\n  - All events `this` context is now the instance of `Kinetic`. \n    To access the `$scroller` which was previously the context you can use `this.$el`\n\n### 1.8.2\n- fix #34, #28, now will discard any subsequent attempts to bind `.kinetic()`\n\n### 1.8.1\n- tweak to hardware trigger css (@edmelly)\n- upgrade to Grunt 0.4\n\n### 1.8\n- add scroll listener to trigger move events (@dennipahmah)\n\n### 1.7\n- add cursor option to change the default `move` cursor\n\n### 1.6.1\n- bug fix release for unbinding touch events\n\n### 1.6\n- use bind for touch events to fix issues on android\n\n### 1.5\n- added ability to prevent capturing scroll depending on the target\n- fix for using alongside jQuery UI draggable #14 - thanks @sidoh, @NilsHolmstrom\n\n### 1.4\n- added ability to nest containers thanks @cc-lam\n- added detach/attach methods\n- added triggerHardware option\n\n### 1.3\n- IE bug fixes when dragging images\n- Adding extensibility for methods by attaching functions to jQuery.\n\n        // add the method\n        $.kinetic.callMethods.do = function(settings, options){\n            // method functionality\n        };\n\n        // use the method\n        $('#elem').kinetic('do', { ... });\n\n- Added stop method\n- Fix bug with ignored axis triggering animation frames\n\n\n\n","maintainers":[{"name":"davetayls","email":"dave.taylor@pogokid.com"}],"time":{"modified":"2022-06-19T05:21:08.230Z","created":"2015-07-20T12:33:54.662Z","2.1.0":"2015-07-20T12:33:54.662Z","2.1.1":"2015-07-20T12:46:07.786Z","2.2.2":"2017-08-23T20:25:57.513Z","2.2.3":"2017-08-23T20:30:44.052Z","2.2.4":"2017-09-10T06:39:32.366Z"},"homepage":"https://davetayls.me/jquery.kinetic","author":{"name":"Dave Taylor","url":"https://davetayls.me"},"license":"MIT","readmeFilename":"README.md"}