Skip to main content

Bug Tracker

Side navigation

#11222 closed bug (duplicate)

Opened January 25, 2012 12:42PM UTC

Closed January 25, 2012 03:34PM UTC

Last modified January 25, 2012 03:34PM UTC

Toggle quick-click breaks display attribute.

Reported by: anonymous Owned by:
Priority: high Milestone: None
Component: effects Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

Issue

When the .toggle() function is triggered via a CLICK event, and the end-user triggers the CLICK event TWICE (double-click):

a) The animation continues until the end

b) The toggle is no longer effective

Testcase

When the CLICK event is only triggered ONCE when the animation is NOT running the .toggle() behaviour runs as expected.

Conclusion

My personal fix was to use the .data() setting a Boolean flag which stated the animation status.

1. Before the .toggle() was executed I set .data("animating", true)

2. Within the .toggle() callback method I set .data("animating", false)

3. Before I trigger the .toggle() I place a condition based on the value of "animating", therefore this prevents the issue.

Nevertheless I would have expected this behaviour be default from the Core.

Example

http://jsfiddle.net/__itsash/m3fwP/

Attachments (0)
Change History (2)

Changed January 25, 2012 03:34PM UTC by timmywil comment:1

component: unfiledeffects
priority: undecidedhigh
resolution: → duplicate
status: newclosed
type: featurebug

This has been fixed. http://jsfiddle.net/m3fwP/2/

Changed January 25, 2012 03:34PM UTC by timmywil comment:2

Duplicate of #10848.