मुझे http://jquery.malsup.com/fadetest.html पर एक बेहतर, अधिक सामान्य समाधान मिला।
मैंने इसे लिया है और इसे एक स्टैंडअलोन जावास्क्रिप्ट फ़ाइल में अनुकूलित किया है जो jQuery फीड *() विधियों का उपयोग करने वाले पृष्ठों में शामिल किया जा सकता है।
//
// jQuery IE Fade Fix
//
// Adapted from code found at http://jquery.malsup.com/fadetest.html.
//
// This is only needed for IE 7 and earlier, so this is best added to your page using IE's conditional comments
// (http://msdn.microsoft.com/en-us/library/ms537512%28VS.85%29.aspx) as follows:
// <!--[if lt IE 8]><script type="text/javascript" src="jquery-ie-fade-fix.js"></script><![endif]-->
//
(function($) {
$.fn.fadeIn = function(speed, callback) {
if ($.isFunction(speed) && callback == undefined) {
callback = speed;
speed = 'normal';
}
return this.animate({opacity: 'show'}, speed, function() {
if ($.browser.msie)
{
this.style.removeAttribute('filter');
}
if ($.isFunction(callback))
{
callback.call(this);
}
});
};
$.fn.fadeOut = function(speed, callback) {
if ($.isFunction(speed) && callback == undefined) {
callback = speed;
speed = 'normal';
}
return this.animate({opacity: 'hide'}, speed, function() {
if ($.browser.msie)
{
this.style.removeAttribute('filter');
}
if ($.isFunction(callback))
{
callback.call(this);
}
});
};
$.fn.fadeTo = function(speed, to, callback) {
if ($.isFunction(speed) && callback == undefined) {
callback = speed;
speed = 'normal';
}
return this.animate({opacity: to}, speed, function() {
if (to == 1 && $.browser.msie)
{
this.style.removeAttribute('filter');
}
if ($.isFunction(callback))
{
callback.call(this);
}
});
};
})(jQuery);
संपादित करें: शामिल joeformd के कॉलबैक के लिए ठीक।
EDIT2: कोने मामले के लिए ठीक जोड़ा गति से परिभाषित नहीं है जहां लेकिन जैसा कि मुझे याद है यह बच्चों के पर काम नहीं करेगा कॉलबैक -Tomi
खैर, यह नहीं सुंदर है कि यह aliased पाठ में fades तो फिल्टर बंद तस्वीरें, लेकिन यह काम करता है। हमें फ़िल्टर को फीका भी करना है! बांध आईई। – chrisdillon
स्टैक ओवरव्लो इस समस्या से पीड़ित है (जब आप "नए उत्तरों लोड करें" पर क्लिक करते हैं)। मुझे उम्मीद है कि टीम में से एक यह जवाब देखती है। –
यह मामूली सुधार प्रदान करता है: http://malsup.com/jquery/cycle/cleartype.html – chrisdillon