开发者

jquery load not working in IE8

开发者 https://www.devze.com 2022-12-22 02:23 出处:网络
web page : http://sideradesign.com/eco-art/gallery/ This code works fine in all brwosers except IE8 (haven\'t tested IE6/7)

web page : http://sideradesign.com/eco-art/gallery/

This code works fine in all brwosers except IE8 (haven't tested IE6/7)

jQuery(function () {
  jQuery("#main-content").append("<img src='../images/ajax-loader.gif' id='ajax-loader' />");
  $ajaxSpinner开发者_高级运维 = jQuery("#ajax-loader");
  var thisTarget = jQuery('#thumbnail-nav ul li:eq(0) a.thumb').attr('href');
  jQuery('#main-content').load(thisTarget + " .entry-content");
  jQuery('a.thumb').click(function () {
    $ajaxSpinner.fadeIn();
    jQuery('#main-content').animate({
        opacity: "0.1"
    });
    thisTarget = jQuery(this).attr('href');
    jQuery('#main-content').load(thisTarget + " .entry-content", function () {
        $ajaxSpinner.fadeOut();
        jQuery('#main-content').animate({
            opacity: "1"
        });
    });
    return false;
});

});


It's the CSS that's causing the problem. I disabled the stylesheet and I can see the content appearing. this is resolved


IE doesn't support the opacity property in CSS, so animating it from jquery isn't going to work. Instead you could use fadeTo, which works around this problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消