I need to show a div (e.g. #mybox) in 10secs after page load, keep it visible for another 10 secs and then hide with a nice sliding in/out effects.
Thanks a lot for
Please use the below function:
cycle(); function cycle() { $('#myid') .delay(10000) .fadeIn(300) .delay(10000) .fadeOut(300, cycle); }
If we don't need a loop, then just one line of code is needed:
$('#myid').delay(10000).fadeIn(300).delay(10000).fadeOut(300);