Example of use: Set a timelag before drop-down menu closes after a mouseout event.
Code: setTimeout("closeMenu()", delay)
The setInterval function also delays for a specified time before triggering the execution of a specific function. However, the command doesn't complete after triggering that function. Instead it waits for a specified time again and then triggers the function again. This process continues (at specified intervals) until page is unloaded or the clearInterval function is called.
Example of use: Slide-in and slide-out animations for the drop-down menu. At every interval, set length and opacity accordingly.
Code: setInterval("ddMenu()", interval)
No comments:
Post a Comment