-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,60 @@ | ||
 | ||
|
||
|
||
Accessability tools menu for website maintainers | ||
|
||
|
||
[](https://travis-ci.org/jossef/open-accessability) | ||
|
||
### Dependencies | ||
jquery | ||
|
||
Free accessability tools menu for website maintainers powered by jQuery. [See the demo](https://jossef.github.io/open-accessability/) | ||
|
||
### Demo | ||
https://jossef.github.io/open-accessability/ | ||
### Getting Started | ||
|
||
### Usage | ||
|
||
#### CDN | ||
Add the following imports (make sure to import jQuery before) | ||
``` | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> | ||
<script src="https://cdn.rawgit.com/jossef/open-accessability/master/dist/open-accessability.min.js"></script> | ||
<link rel="stylesheet" href="https://cdn.rawgit.com/jossef/open-accessability/master/dist/open-accessability.min.css"> | ||
``` | ||
|
||
#### Bower | ||
|
||
<script> | ||
$(function () { | ||
$('body').openAccessibility(); | ||
}) | ||
</script> | ||
``` | ||
bower install open-accessability --save | ||
``` | ||
|
||
### Customization | ||
#### NPM | ||
|
||
``` | ||
npm install open-accessability --save | ||
``` | ||
|
||
### Initialization | ||
|
||
default options can be overidden on initialization | ||
|
||
In order for the plugin to load, it has to be initialized like so: | ||
``` | ||
defaultOptions = { | ||
isMenuOpened: false, | ||
highlightedLinks: false, | ||
isMobileEnabled: false, | ||
grayscale: 0, | ||
brightness: 100, | ||
contrast: 100, | ||
maxZoomLevel: 3, | ||
minZoomLevel: 0.5, | ||
zoomStep: 0.2, | ||
zoom: 1, | ||
cursor: false, | ||
textSelector: '.open-accessibility-text', | ||
invert: false | ||
}; | ||
$('body').openAccessibility(); | ||
``` | ||
|
||
In addition, some default options may be overidden on initialization: | ||
``` | ||
<script> | ||
$('body').openAccessibility({ | ||
textSelector: 'h1,p' | ||
}); | ||
</script> | ||
$('body').openAccessibility({ | ||
textSelector: 'h1,p' | ||
}); | ||
``` | ||
|
||
Full list of default options: | ||
``` | ||
isMenuOpened: false | ||
highlightedLinks: false | ||
isMobileEnabled: false | ||
grayscale: 0 | ||
brightness: 100 | ||
contrast: 100 | ||
maxZoomLevel: 3 | ||
minZoomLevel: 0.5 | ||
zoomStep: 0.2 | ||
zoom: 1 | ||
cursor: false | ||
textSelector: '.open-accessibility-text' | ||
invert: false | ||
``` | ||
|