jQuery Spoilers plugin


Spoilers is a jQuery plugin which implements a feature first seen on the imdb.com web site. For an example, see:

http://imdb.com/title/tt0084787/faq

Scroll down that page until you see some red "Spoilers!" text, then move your mouse over that text. Moving the mouse over it causes "Spoilers!" to disappear and the underlying text to be revealed. The intention is to keep the casual reader from inadvertently reading details which he might not want to know. By mousing over them he can reveal the details.

This plugin implements that behaviour.

If you would like to see a standalone demo of the plugin, click here.

License: Public Domain

Filename Size (bytes)
sgbeal-spoilers-20070809.jquery.yuimin.js 419
sgbeal-spoilers-20070809.jquery.pack.js 682
sgbeal-spoilers-20070809.jquery.min.js 543
sgbeal-spoilers-20070809.jquery.js 4326
sgbeal-spoilers-20070808.jquery.yuimin.js 203
sgbeal-spoilers-20070808.jquery.pack.js 496
sgbeal-spoilers-20070808.jquery.min.js 232
sgbeal-spoilers-20070808.jquery.js 2892

What the various *.js files are:
  • *.jquery.js or jquery.PLUGIN_NAME.js = the full-fledged, human-readable/editable source code files, including documentation for using the code.
  • *.pack.js = "packed" source code files, meaning they are optimized for maximum space savings (which also means obfuscated). They are created using one of the packers derived from http://dean.edwards.name/packer/.
  • *.min.js = source code files "minimized" for space savings using jsmin. They are not obfuscated, but are nonetheless not intended for human consumption.
  • *.yuimin.js = similar to the .min.js files, but these are compressed using the YUI minifier, which claims to be less error-prone than the conventional PACK method and smaller than normal MINinification. They are obfuscated, not intended for human consumption.
When deploying applications which use this code, the compressed versions are recommended, as they help reduce the download time of the application. Also, combining multiple scripts into a single file can notably reduce the download overhead.

If you use this plugin and like it, please go rate it on the jQuery site.