Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery hover and fadeTo effect is slow in IE 8
    primarykey
    data
    text
    <p>I've been developing my website in both Firefox and IE 8. There's an image hover effect on the main page (as well as in the photography and drawing sections). You can see the code in the source at <a href="http://www.dgendill.com" rel="nofollow noreferrer">http://www.dgendill.com</a>. In Firefox, the effect works perfect. In IE 8, it works, but it's much, much slower. Here's what I've tried to improve the speed:</p> <ol> <li>Used the optimized jQuery library</li> <li><p>Narrowed the scope with which jQuery traverses the DOM. For instance:</p> <pre><code>$(".sectionLink","#divLandingPage").hover( function(){ $(this).addClass("hover"); $(this).fadeTo(100,.8); }, function(){ $(this).removeClass("hover"); $(this).fadeTo(100,.99); } ); </code></pre></li> <li><p>I've tried changing the display type of the image. Display block, inline-block, and inline.</p></li> </ol> <p>Any ideas why IE 8 is so much slower? My HTML is valid 4.01.</p> <p>Here's a guy that's worked with the same problem: <a href="http://mdasblog.wordpress.com/2009/07/24/jquery-fun-with-animation-and-opacity/" rel="nofollow noreferrer">http://mdasblog.wordpress.com/2009/07/24/jquery-fun-with-animation-and-opacity/</a></p> <p>I've decided to just disable the hover effect in IE.</p> <pre><code>if(jQuery.support.opacity) { $(".sectionLink","#divLandingPage").hover( function(){ $(this).addClass("hover"); $(this).fadeTo(100,.8); }, function(){ $(this).removeClass("hover"); $(this).fadeTo(100,.99); } ); } </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