Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>For your second question</strong>: in my experience this is usually because a Javascript error has occurred somewhere else on the page. Once there is one Javascript exception, the rest of the page stops running Javascript. Try installing <a href="http://getfirebug.com/" rel="nofollow noreferrer">Firebug</a> (if you haven't already), then open up the "Console" tab and enable it. Then any javascript errors or exceptions will be printed to the console.</p> <p>Another thing to try (which kinda contradicts my last statement...) is to disable all your browser plug-ins to see if you can recreate. Sometimes they interfere with scripts on the page (particularly GreaseMonkey.)</p> <p><strong>If you could provide a sample HTML snippet which reproduces this animation problem it would be a lot easier for us to help you.</strong> In the script I have pasted below, I can click it all day, as fast or slow as I like, and it never fails to animate for me.</p> <hr> <p><strong>For the first question</strong>: I know you said you'd found a workaround, but the following works for me (even on IE6) so I thought I'd post it, since it may be different from what you were thinking. (Note that setting CSS "opacity" property through <code>jQuery.css()</code> works on IE, whereas IE does not support the "opacity" property directly in CSS.)</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;style&gt; body { background-color: #08f; } #test { background-color: white; width: 100px; } &lt;/style&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; var myOpacity = 0.125; $(function(){ $('#test').css('opacity', myOpacity); $('a').click(function(){ myOpacity = 1.0 - myOpacity; $('#test').animate({ opacity: myOpacity }); return false; }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;p&gt;&lt;a href="#"&gt;Click me&lt;/a&gt;&lt;/p&gt; &lt;div id="test"&gt;Test&lt;/div&gt; &lt;/body&gt;&lt;/html&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload