Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A quick search on the subject shows the following:</p> <p><a href="http://blog.bmn.name/2008/03/jquery-fadeinfadeout-ie-cleartype-glitch/" rel="noreferrer">jQuery fadeIn/fadeOut IE cleartype glitch</a></p> <p>The problem seems to be that the CSS "filter" attribute is not automatically removed. <strong>The most simple solution</strong> to this problem would be removing it manually:</p> <pre><code>$('#myDiv').fadeIn('slow', function() { this.style.removeAttribute('filter'); }); </code></pre> <p>As the blog post above explains, this is a rather messy solution.</p> <p>Excerpt from the blog post, including a <strong>cleaner solution</strong> to this problem:</p> <blockquote> <p>This means that every single time we want to fade an element, we need to remove the filter attribute, which makes our code look messy.</p> <p>A simple, more elegant solution would be to wrap the .fadeIn() and .fadeOut() functions with a custom function via the plugin interface of jQuery. The code would be exactly the same, but instead of directly calling the fade functions, we call the wrapper. Like so:</p> </blockquote> <pre><code>$('#node').customFadeOut('slow', function() { //no more fiddling with attributes here }); </code></pre> <blockquote> <p>So, how do you get this working? Just include the following code after you include the jQuery library for the added functionality.</p> </blockquote> <pre><code>(function($) { $.fn.customFadeIn = function(speed, callback) { $(this).fadeIn(speed, function() { if(jQuery.browser.msie) $(this).get(0).style.removeAttribute('filter'); if(callback != undefined) callback(); }); }; $.fn.customFadeOut = function(speed, callback) { $(this).fadeOut(speed, function() { if(jQuery.browser.msie) $(this).get(0).style.removeAttribute('filter'); if(callback != undefined) callback(); }); }; })(jQuery); </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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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