jQuery plugin that creates the basic interactivity for a flyout that opens on focus
npm install jquery-hover-flyoutjQuery plugin that creates the basic interactivity for a flyout that opens on hover of trigger element
``js`
$(selector).hoverFlyout();
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.
`js`
npm install jquery-hover-flyout
Markup before plugin:
`html`
Execute plugin:
`js`
$('.flyout').hoverFlyout();
Markup after plugin:
`html`
'Hover' event on button will now toggle aria-expanded state of button. CSS can use this state to hide/show overlay. For example:
`css`
.flyout__overlay {
display: none;
position: absolute;
z-index: 1;
}
.flyout__trigger[aria-expanded=true] ~ .flyout__live-region > .flyout__overlay {
display: block;
}
* options.overlaySelector - selector for overlay element (default: '.flyout__overlay')options.triggerSelector
* - selector for trigger element (default: '.flyout__trigger')options.expandedClass
* - if present, uses this class instead of aria-expanded (default: null)
* flyoutExpand - the flyout has expandedflyoutCollapse
* - the flyout has collapsed
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 changenpm run build
* cleans, lints, tests and minifies
Execute npm run to view all available CLI scripts.
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
*
https://travis-ci.org/makeup-jquery/jquery-hover-flyout
https://coveralls.io/github/makeup-jquery/jquery-hover-flyout?branch=master