/jquery-table-highlighter

Simple jQuery plugin that adds a class to table rows on the `hover` event.

Primary LanguageJavaScript

jQuery Table Highlighter plugin

jQuery plugin that adds a class to table rows on the hover event. In addition, if a link exists in the row then optionally the entire row can become clickable for that link.

Usage

Simple usage:

$('#my_table').tableHighlighter();

Advanced usage:

$('#my_table').tableHighlighter({
    hilightClass:   'highlight',
    containsLinks:  true,
    linkSelector:   'a:first'
});

Options

  • hilightClass - The class to be applied to table rows on hover. Defaults to highlight.
  • containsLinks - Whether the row contains any clickable links. Boolean defaults to true.
  • linkSelector - A jQuery selector to match the link on the table row. Defaults to a:first.

License

Dual licensed under the MIT and GPL licenses.

Copyright (c) 2010 Aaron Russell.