OKHover by OKFocus
OKHover is a jQuery plugin that makes it easy to reproduce the tiled background effect seen on the OKFocus website. It uses HTML5 data attributes and is designed to be simple yet highly customizable.
OKHover binds to any DOM element, usually a list item.
<a href='#' data-okimage='http://example.com/path/to/an/image.gif'> a link </a>
|fadeIn||Boolean, controls if the background image will fade in||false|
|fadeOut||Boolean, controls if the background image will fade out||false|
|fadeInDuration||Number, controls fade-in duration (in milliseconds)||400|
|fadeOutDuration||Number, controls fade-out duration (in milliseconds)||400|
|zIndex||Number, controls the z-index of the background div||-1|
|el||JQuery selector, specifying the element to use for the background effect.|
The only real technical requirement besides jQuery itself, is declaring the HTML5 doctype for your web application. This ensures that using data attributes will be considered valid markup by browsers.
Copyright © 2011 OKFocus, http://okfoc.us Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.