Home › Forums › JavaScript › [Solved] Help with simple setTimeout() issue › Re: [Solved] Help with simple setTimeout() issue
January 20, 2011 at 2:47 pm
#65094
Participant
This is what I have so far
$("#menu").hover(
function () {
},
function () {
});
function doMove() {
if ($('#fragment').hasClass('selected') == true)
{
$('#mover').animate({"top": "0px"}, "fast");
};
setTimeout(doMove,5000);
};
window.onload=function() {
setTimeout(doMove,5000);
}
I’m not sure what to put in the hover function to reset to rerun doMove(). When you hover #menu, it has to stop doMove(), and when you hover back off, it has to rerun it from the beginning