jquery-prevent-document-scroll-keys v0.4.2
jquery-prevent-document-scroll-keys
Prevent main page scroll when pressing any scroll key (e.g. down arrow, spacebar) with focus on given selector.
$(selector).preventDocumentScrollKeys();This plugin is deprecated and scheduled for removal from NPM. Please use jquery-prevent-scroll-keys instead.
Experimental
This plugin is still in an experimental state, until it reaches v1.0.0 you must consider all minor releases as breaking changes. Patch releases may introduce new features, but will be backwards compatible.
Install
npm install jquery-prevent-document-scroll-keysNOTE: The @ebay package scope is no longer supported. In order to receive latest NPM updates, please use the non-scoped version of this package.
Example
$('.tabs [role=tab]').preventDocumentScrollKeys();Dependencies
Development
Run npm start for test driven development. All tests are located in test.js.
Execute npm run to view all available CLI scripts:
npm starttest driven development: watches code and re-tests after any changenpm testruns tests & generates reports (see reports section below)npm run lintlints code and reports to jshint.txtnpm run minifybuilds minified version of codenpm run buildcleans, lints, tests and minifies (called onnpm prepublishhook)npm run cleandeletes all generated test reports and coverage files
Reports
Each test run will generate the following reports:
/test_reports/coveragecontains Istanbul code coverage report/test_reports/htmlcontains HTML test report/test_reports/junitcontains JUnit test report
CI Build
https://travis-ci.org/ianmcburnie/jquery-prevent-document-scroll-keys
Code Coverage
https://coveralls.io/github/ianmcburnie/jquery-prevent-document-scroll-keys?branch=master