Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jossef authored Dec 26, 2016
1 parent d5dfdf7 commit a31a742
Showing 1 changed file with 40 additions and 38 deletions.
78 changes: 40 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,60 @@
![image](https://raw.githubusercontent.com/jossef/open-accessability/master/misc/banner.png)


Accessability tools menu for website maintainers


[![Build Status](https://travis-ci.org/jossef/open-accessability.svg?branch=master)](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
```

0 comments on commit a31a742

Please sign in to comment.