Skip to content
This repository has been archived by the owner on Mar 22, 2019. It is now read-only.

jQuery Plugin: Highlight Search Terms: Highlight search terms in referrer URL from Google, Yahoo!, Bing and custom site.

Notifications You must be signed in to change notification settings

hail2u/jquery.highlight-search-terms

Repository files navigation

jQuery Plugin: Highlight Search Terms v0.4.2

Highlight search terms in referrer URL from Google, Yahoo!, Bing and custom site.

Usage

Highlight all contents of body element:

$("body").highlightSearchTerms();

Highlight with custom tag name:

$("body").highlightSearchTerms({
  tagName: "span"
});

Highlight with custom class name:

$("body").highlightSearchTerms({
  className: "keyword"
});

Support custom referrer pattern:

$("body").highlightSearchTerms({
  referrerPatterns: [
    "^http://example\\.com.+[&?]query=([^&]+).*$"
  ]
});

LICENSE

MIT: http://hail2u.mit-license.org/2009

About

jQuery Plugin: Highlight Search Terms: Highlight search terms in referrer URL from Google, Yahoo!, Bing and custom site.

Resources

Stars

Watchers

Forks

Packages

No packages published