Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add callbacks #10

Merged
merged 3 commits into from Feb 25, 2017
Merged

Conversation

fijiwebdesign
Copy link
Contributor

Will add a callback to be fired on each element that is highlighted.

$('body').highlight('example text', {className: 'highlight'}, function(el) {
      // el is the current highlighted element
      $(el).on('hover', function() { console.log('el', el) })
    });

Copy link
Owner

@knownasilya knownasilya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Could you document this new feature in the readme?

@fijiwebdesign
Copy link
Contributor Author

@knownasilya Added to readme.

@knownasilya knownasilya merged commit 3064b2e into knownasilya:master Feb 25, 2017
knownasilya pushed a commit that referenced this pull request Mar 12, 2017
* Added a callback to be fired for each highlighted DOM node

* Fixed added callback to childnodes recursive highlight call

* Added callback to readme and formatted readme.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants