Search and Top Navigation
#4718 closed bug (fixed)
Opened July 24, 2009 09:15PM UTC
Closed November 16, 2009 02:51AM UTC
pulsate pulses one extra time.
Reported by: | urkle | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.8 |
Component: | ui.effects.* (individual effect) | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If i do a $('#someelement').effect("pulsate",{times:3},500);
I expect it to "pulse" 3 times, however it actually pulses 4.
This is more apparent if you want it to pulse 1 time.
$('#someelement').effect("pulsate",{times:1},500);
it actually fades out twice.
Attachments (0)
Change History (3)
Changed July 30, 2009 07:33PM UTC by comment:1
Changed November 04, 2009 06:20PM UTC by comment:2
i can confirm this issue for the past year it has bugged the hell out of me.
i can also confirm the fix works.
// c from zero to one f=f-2}for(var c=1;c<f;c++){d
Changed November 16, 2009 02:51AM UTC by comment:3
milestone: | TBD → 1.8 |
---|---|
resolution: | → fixed |
status: | new → closed |
Fixed in r3454.
From looking at the source code it seem the code iterates through "times" number of times. And then does ONE more that calls the callback the user supplied.
Having the main for-loop start at i=1 instead of i=0 should resolve the issue. the isHidden case will of course need to be reviewed to determine if it needs to be "times - 2" or "times - 1" to make sure that case is correct as well.