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

Latest commit

 

History

History
38 lines (24 loc) · 703 Bytes

README.md

File metadata and controls

38 lines (24 loc) · 703 Bytes

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