On Aug 8, 6:28 pm, Stephan Beal <[EMAIL PROTECTED]> wrote:
> For the click, i was thinking: clicking on the overlay will unhide the
> text, and mouse-out will hide it again, but that might be tedious/
@Sam & Dan:
i've added click-toggle and hoverIntent support via an optional init
parameter:
$('.jqSpoiler').initSpoilers({method:'click'});
$('.jqSpoiler').initSpoilers({method:'hoverIntent'}); // requires
hoverIntent plugin
The default is method:'hover'.
This doubled the MIN'd size of the code, though. It's now a whopping
424 bytes ;).
These features will be included in tomorrow's release. (i use the date
as the version number, and i've already made a release today, so i've
gotta wait another 5 hours [CET/GMT+1] before i can make a new
release ;).
You can have multiple types of spoiler revealing on one page by simply
using a marker class, like this:
// On-hover spoiler:
$('.jqSpoiler').initSpoilers();
// On-hover spoiler using hoverIntent plugin:
$('.jqSpoilerIntent').initSpoilers({method:'hoverIntent'})
.addClass('jqSpoiler');
// Clickable spoiler:
$('.jqSpoilerClick').initSpoilers({method:'click'})
.addClass('jqSpoiler');
The addClass() is used to ensure that the items marked with the marker
classes get the same CSS treatment.