#78 accepted
Jake Archibald

Overlay: Allow a delay for show & hide

Reported by Jake Archibald | July 28th, 2009 @ 10:00 AM | in 2.0

Allow Overlays to show / hide after a delay. Useful for rollover usability

glow.events.addListener("#blah", "mouseenter", function() {
  // show the overlay 2 seconds after entering #blah
    delay: 2

glow.events.addListener("#blah", "mouseleave", function() {
  // hide the overlay 1 second after leaving #blah
    delay: 1

With the above code, the mouse would have to be over #blah for 2 seconds before the overlay would show. The overlay would not show if the mouse left #blah before those 2 seconds were up (ie, calling hide would cancel the timeout straight away).

If the mouse leaves #blah, the overlay would hide after 1 second, if the mouse returns to #blah within that second, the overlay would remain shown (ie, calling show would cancel the timeout straight away).

Useful enough to include?

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A JavaScript Library

Shared Ticket Bins

People watching this ticket