Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery .animate() not doing anything in IE8
    primarykey
    data
    text
    <p>I have a <code>div</code> of text (<code>#text-write</code>), each character of which is <code>span</code>ned. The <code>div</code> is <code>absolute</code>ly <code>position</code>ed inside a <code>relative</code>ly <code>position</code>ed container <code>div</code> (<code>#typetext</code>). Here's the effect intended:</p> <ol> <li>Animate inner <code>div</code> (<code>#text-write</code>) to <code>opacity 0</code> for 400ms.</li> <li>Animate each <code>span</code> inside inner <code>div</code> one after the other to <code>opacity 1</code> for 400ms each.</li> <li>Pause for 5 seconds.</li> <li>Go back to 1.</li> </ol> <p>I simply can't make this work in IE8. It works in IE7 and below, IE9, other major and obscure (that i know of) browsers. I've been pulling my hair trying out everything I found on the net (add layout to the <code>absolute</code>ly <code>position</code>ed inner <code>div</code>, play with <code>filter</code>, try fade, etc.) for the last 5 or so hours.</p> <p>The logic is running (I tried inserting an <code>alert</code> in the recursive call, and IE8 does the <code>alert</code> for each <code>span</code>ned letter and in the exact timing, even the pause), no errors in console, either.</p> <p>But nothing is happening to the <code>opacity</code>. It does not even disappear. It just stays there.</p> <p>Can you help?</p> <pre><code> jQuery(function() { // span each letter in text var textType = jQuery('#text-write').remove().text(), textTypeLength = textType.length, fadeSpeed = 400, fadePause = 5000, textSpanned = ''; for (i=0;i&lt;textTypeLength;i++) textSpanned += '&lt;span&gt;' + textType.charAt(i).replace(' ','&amp;nbsp;') + '&lt;\/span&gt;'; jQuery('#typetext').append('&lt;div id="text-write"&gt;'+ textSpanned + '&lt;\/div&gt;'); // fade phrase logic function fadeType(){ var letters = jQuery('#text-write span').animate({opacity: 0}, fadeSpeed), i=0; (function(){ jQuery(letters[i++]).animate({opacity: 1}, fadeSpeed, arguments.callee); })(); } // make it happen fadeType(); setInterval(function(){fadeType();},fadePause + fadeSpeed + (textTypeLength*fadeSpeed)); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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