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-keys
NOTE: 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 start
test driven development: watches code and re-tests after any changenpm test
runs tests & generates reports (see reports section below)npm run lint
lints code and reports to jshint.txtnpm run minify
builds minified version of codenpm run build
cleans, lints, tests and minifies (called onnpm prepublish
hook)npm run clean
deletes all generated test reports and coverage files
Reports
Each test run will generate the following reports:
/test_reports/coverage
contains Istanbul code coverage report/test_reports/html
contains HTML test report/test_reports/junit
contains 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