Skip to content

Commit

Permalink
Merge branch 'master' of github.com:720kb/highlighter.js
Browse files Browse the repository at this point in the history
  • Loading branch information
45kb committed Jul 9, 2015
2 parents 6b6cdb2 + 432127e commit fe0d0f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,22 +138,23 @@ Highlighter.select('<span>');
Sometime you could need to work only on visible/viewable elements, so, to skip invisible or hidden elements, set the option ```{ viewable:true}```

```javascript
var Highlighter = new window.Highlighter({
var Highlighter = new Highlighter({
'viewable':true //this way Highlighter.js will exclude/avoid selecting or highlighting hidden/invisible elements
});
```

####Scroll to the underlined element
Sometime you could need to scroll to the current underlined element, so, to automatically scroll to it once is underlined you can set the options ```{scroll:true, scrollDuration: 500 }```
```javascript
var Highlighter = new window.Highlighter({
var Highlighter = new Highlighter({
'scroll':true, //Automatically scroll to the underlined element
'scrollDuration': 500 //milliseconds
});
```

##Gtk
- Not yet 100% ready for production
- isVisible() control need a deep check, it could probably mistake at any time
- Scroller is a bit horrible atm
- If no selectable next elements, Highlighter will restart from the first element in DOM
- If no selectable previous elements, Highlighter will restart from the first element in DOM

0 comments on commit fe0d0f9

Please sign in to comment.