Skip to content
This repository has been archived by the owner on Oct 3, 2019. It is now read-only.

Prevent scrolling when pressing any scroll key (e.g. down arrow, spacebar) when on a widget

License

Notifications You must be signed in to change notification settings

makeup-jquery/jquery-prevent-scroll-keys

Repository files navigation

jquery-prevent-scroll-keys

Build Status Coverage Status Dependency status devDependency status

Prevent scrolling when pressing any scroll key (e.g. down arrow, spacebar) with focus on given selector.

$(delegateSelector).preventScrollKeys(delegateDescendantSelector);

Install

npm install jquery-prevent-scroll-keys

Example

$('.tabs').preventScrollKeys('[role=tab]');

Dependencies

Development

Useful NPM task runners:

  • npm start for local browser-sync development.
  • npm test runs tests & generates reports (see reports section below)
  • npm run tdd test driven development: watches code and re-tests after any change
  • npm run build cleans, lints, tests and minifies

Execute npm run to view all available CLI scripts.

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/makeup-jquery/jquery-prevent-scroll-keys

Code Coverage

https://coveralls.io/github/makeup-jquery/jquery-prevent-scroll-keys?branch=master

About

Prevent scrolling when pressing any scroll key (e.g. down arrow, spacebar) when on a widget

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published