Skip to main content

Bug Tracker

Side navigation

#3381 closed bug (invalid)

Opened September 19, 2008 02:54AM UTC

Closed February 18, 2009 03:30AM UTC

Queue bug?

Reported by: populus Owned by:
Priority: major Milestone: 1.3
Component: effects Version: 1.2.6
Keywords: Cc: populus, flesler
Blocked by: Blocking:
Description

The following code causes problems with queueing.

If I click the left button, then click right button two or more times while the animation is still going on, then the entire queue for 'right click' is executing simultaneously

$("div#container div.slider #left").click(function()

{

sr.queue( function()

{

//alert(sr.css('left') + " " + (-$(this).width())+'px');

if ($(this).css('left') < '0px')

{

$(this).animate({'left': '+=600px'}, 1000);

}

$(this).dequeue();

}

);

}

);

$(document).keydown(function(e)

{

if (e.keyCode == 37)

{

$("div#container div.slider #left").click();

}

else if (e.keyCode == 39)

{

$("div#container div.slider #right").click();

}

}

);

Attachments (0)
Change History (3)

Changed September 19, 2008 02:56AM UTC by populus comment:1

my mistake!

Wrong section of code posted

$("div#container div.slider #right").click(function()

{

sr.queue( function()

{

alert($(this).css('left') > (-$(this).width() + 600)+'px');

if ($(this).css('left') > (-$(this).width() + 600)+'px')

{

$(this).animate({'left': '-=600px'}, 1000);

}

$(this).dequeue();

}

);

}

);

$("div#container div.slider #left").click(function()

{

sr.queue( function()

{

alert($(this).css('left') < '0px');

if ($(this).css('left') < '0px')

{

$(this).animate({'left': '+=600px'}, 1000);

}

$(this).dequeue();

}

);

}

);

Changed September 19, 2008 03:30PM UTC by flesler comment:2

cc: → populus, flesler
component: unfilledfx
need: ReviewTest Case
owner: flesler

Can you make a test case out of this ? one html file with the required js & css.

Thanks

Changed February 18, 2009 03:30AM UTC by dmethvin comment:3

resolution: → invalid
status: newclosed

Please reopen and attach a test case if the problem is still there. Also check out the

.stop()
method if you need to terminate an effect prematurely.

http://docs.jquery.com/Effects/stop#clearQueuegotoEnd