<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
What if instead of stopping the function when it does not pass the
check,
we add a else statement that calls back the function using a small
timeout ?
I think that this would prevent the case you describe.(that I noticed
also on my own script)
-Olivier
Karl Swedberg wrote:
<blockquote
cite="mid2FF197FC-ADE6-42AA-8F0A-142CD0A4338D@englishrules.com"
type="cite">Hi David,
<div><br class="khtml-block-placeholder">
</div>
<div>I tried something like that earlier, but if I land on a tab that
I want opened while another tab is animated, I'll have to move out and
then back over the tab for it to trigger. I still believe that there is
some magic in those other methods (queue, etc.), but I haven't found it
yet.
<div> <span class="Apple-style-span"
style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;"><br
class="Apple-interchange-newline">
<span class="Apple-style-span"
style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;">
<div><br class="khtml-block-placeholder">
</div>
<div>--Karl</div>
<div><br class="khtml-block-placeholder">
</div>
<br class="Apple-interchange-newline">
</span></span> </div>
<div>
<div>On Oct 16, 2007, at 11:21 AM, David Serduke wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div style="margin: 0px; min-height: 14px;">
</div>
<div style="margin: 0px;">I suggest you change Oliver's check to
see if ANY of the panels are</div>
<div style="margin: 0px;">animating.</div>
<div style="margin: 0px; min-height: 14px;">
</div>
<div style="margin: 0px;">if
($this.parent().siblings().children().filter(':animated').length ==</div>
<div style="margin: 0px;">0) {</div>
<div style="margin: 0px; min-height: 14px;">
</div>
<div style="margin: 0px;">I think that will give similar
functionality to the original.<span class="Apple-converted-space"> </span>Not</div>
<div style="margin: 0px;">that it is ideal since in the mootools
version you can move over a</div>
<div style="margin: 0px;">panel and move back quickly (while it is
still animating) and end up</div>
<div style="margin: 0px;">pointing at a closed menu while the open
one is not closed.<span class="Apple-converted-space"> </span>That
will</div>
<div style="margin: 0px;">change as soon as you move the mouse
though so perhaps it isn't so</div>
<div style="margin: 0px;">awful.</div>
<div style="margin: 0px; min-height: 14px;">
</div>
<div style="margin: 0px;">David</div>
<div style="margin: 0px; min-height: 14px;">
</div>
<div style="margin: 0px;">On Oct 15, 5:47 pm, Karl Swedberg
<a class="moz-txt-link-rfc2396E" href="mailto:k...@englishrules.com"><
k...@englishrules.com></a> wrote:</div>
<blockquote type="cite">
<div style="margin: 0px;">Olivier,</div>
<div style="margin: 0px; min-height: 14px;">
</div>
<div style="margin: 0px;">You're right! Thanks a lot for the
suggestion.</div>
<div style="margin: 0px; min-height: 14px;">
</div>
<div style="margin: 0px;">When I tested in Firebug, it didn't
look like there were a lot of <span class="Apple-converted-space"> </span></div>
<div style="margin: 0px;">"before" logs firing without the
"after" logs, but even having it <span class="Apple-converted-space"> </span></div>
<div style="margin: 0px;">happen just a few times warrants the
extra ":animated" condition in <span class="Apple-converted-space"> </span></div>
<div style="margin: 0px;">there.</div>
<div style="margin: 0px; min-height: 14px;">
</div>
<div style="margin: 0px;">Thanks again for testing and
contributing! Much appreciated.</div>
<div style="margin: 0px; min-height: 14px;">
</div>
<div style="margin: 0px;">--Karl</div>
<div style="margin: 0px;">_________________</div>
<div style="margin: 0px;">Karl
Swedbergwww.englishrules.comwww.learningjquery.com</div>
<div style="margin: 0px; min-height: 14px;">
</div>
<div style="margin: 0px;">On Oct 15, 2007, at 4:29 PM, Olivier
Percebois-Garve wrote:</div>
<div style="margin: 0px; min-height: 14px;">
</div>
<div style="margin: 0px; min-height: 14px;">
</div>
<div style="margin: 0px; min-height: 14px;">
</div>
<blockquote type="cite">
<div style="margin: 0px;">Hi</div>
<div style="margin: 0px;">although there is many things unclear
to me in animations,</div>
<div style="margin: 0px;">":animated" seems to work right.</div>
</blockquote>
<div style="margin: 0px; min-height: 14px;">
</div>
<blockquote type="cite">
<div style="margin: 0px;">I suggest<span
class="Apple-converted-space"> </span>the addition<span
class="Apple-converted-space"> </span>of a case around<span
class="Apple-converted-space"> </span>the code in your <span
class="Apple-converted-space"> </span></div>
<div style="margin: 0px;">slideTabs() function : if
(!$this.next().is(':animated'))</div>
</blockquote>
<div style="margin: 0px; min-height: 14px;">
</div>
<blockquote type="cite">
<div style="margin: 0px;">With console.log(), I noticed that
over<span class="Apple-converted-space"> </span>events are being
fired <span class="Apple-converted-space"> </span></div>
<div style="margin: 0px;">far more often than<span
class="Apple-converted-space"> </span>necessary.</div>
<div style="margin: 0px;">Using your menu, where<span
class="Apple-converted-space"> </span>button are pretty small,<span
class="Apple-converted-space"> </span>I<span
class="Apple-converted-space"> </span>have normally <span
class="Apple-converted-space"> </span></div>
<div style="margin: 0px;">the over event being fired 2 times</div>
<div style="margin: 0px;">when the tab slides up only one time.