Main page:
menu div
and
#loadit div, into which the menu links load html pages.
The loaded pages:
<div>
several identical-sized images in a stack, z-indexed;
several text overlays
</div>
The function on the menu link, eg doPage1(), fades in and out images and text, with appropriate delays and transition speeds.
We need to kill the animation currently running when the viewer switches to a new menu link. I think applying stop() to the div within #loadit should kill the animation, but the syntax I've tried doesn't do it, eg
$('#loadit.div').stop().doPage1() or $('#loadit div').stop().doPage1()
Also, is the correct syntax of clearQueue $('#whatever').stop('true') ?
This is getting urgent: what was previously an amateur inhouse project is now to go online and I need to find a solution quick.
Cheers!
03-05-2013, 04:30 PM
ReFreezed
Hi ctoz,
stop() just stops the animation - it does not finish nor reset the style of the animated elements, which might have given you weird results. Also note that stop() doesn't affect underlying elements. (So if you're animating images and text overlays inside the div(s) then those won't stop.)
To answer your second question, stop(clearQueue) expects a boolean true - not a string.
(Also note that $('#loadit.div') will look for any element with the ID "loadit" and the class "div".)