The problem is not with add code to autoslide. The problem is with the method. In original code, css fade is used. IE8 and IE7 have problem with css fade. So after try many solutions, I decided to stop with fade in IE, in other browsers continues. I change the code to:
(function($) {
$(document).ready( function() {
$('.feature-slider a').click(function(e) {
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
if (ieversion>=8)
$('.featured-posts section.featured-post').css({
opacity: 1,
visibility: 'hidden'
}); }
else
$('.featured-posts section.featured-post').css({
opacity: 0,
visibility: 'hidden'
});
$(this.hash).css({
opacity: 1,
visibility: 'visible'
});
$('.feature-slider a').removeClass('active')
$(this).addClass('active');
e.preventDefault();
});
});
var current=1;
If browser is IE I put the start opacity to 1 like the second. So It doesn′t have any animation, only show and hide the image. To resolve the problem with black borders (with PNG and Gif too) I used it
function fixPNGs(){
if(jQuery.browser.msie && jQuery.browser.version < 9){
var i;
//alert(document.images.length);
for(i in document.images){
if(document.images[i].src){
var imgSrc = document.images[i].src;
if(imgSrc.substr(imgSrc.length-4) === '.png' || imgSrc.substr(imgSrc.length-4) === '.PNG'){
document.images[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true',sizingMethod='crop',src='" + imgSrc + "')";
}
}
}
}
}
It not the perfect solution, because in the second loop, I don′t know why, the first imagem show with black borders. I use PNG and GIF with background transparent.