jQuery Plugin: Highlight Search Terms: Highlight search terms in referrer URL from Google, Yahoo!, Bing and custom site.
JavaScript
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
highlight-search-terms.jquery.json
jquery.highlight-search-terms.js
jquery.highlight-search-terms.min.js
test.html

README.md

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