[jQuery] 1.0a toggle() function
In IE/PC:
first click does nothing.
second click triggers "open" function.
3rd click triggers "close" function.
works fine after that.
Maybe it's got to do with the way you're setting the display for the div?
<!----------------//------
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
andy@icglink.com
615.370.1530 x737
--------------//--------->
-----Original Message-----
From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com]On
Behalf Of Eric Diamond
Sent: Monday, July 10, 2006 4:40 PM
To: discuss@jquery.com
Subject: [jQuery] 1.0a toggle() function
Hi there, I'm new to jQuery but am excited to start working with it.
My issue lies with the new toggle() function that works as such:
"$().toggle(function, function): Whenever a matched element is
clicked, the first function is fired, when clicked again, the second
is fired, all subsequent clicks continue to rotate through the two
functions."
Well when I try to run a function which calls toggle, I get the
following result:
Click 1 - Nothing happens
Click 2 - First function is called with a slight flicker in FF
Click 3 - Second function is called flawlessly
Click 4, 5, 6, 7 ... - Works as it should
Here's a demo:
http://stars-linux.wustl.edu/jquery/
Could this be a small bug in the alpha release or am I just not using
it correctly? Should I bind the toggle function on a click? I'm no
javascript pro so it's quite possible it's my fault.
Thanks for looking,
Eric D
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/