jQuery,if语句交换图像的粘贴头,如何淡入图片?

时间:2015-08-17 17:49:55

标签: jquery fadein

我试图找出如何在图片加载到标头中时淡入图像。我试过了

$(document).ready(function () {
    $(document).scroll(function () {
        if ($('section#skin_header').hasClass("scroll-to-fixed-fixed") && $('section#skin_header').find(".site_logo").length <= 0) {
            $(".site_logo").insertBefore($("nav.menu_box"));
            $("div.site_logo a img").attr("src", "/dnn/Portals/0/Images/FG/fglogo_sm.png").css("padding-top", "5px");
**$("div.site_logo a img").fadeIn("1000");**

        }
        else if ($('section#skin_header').hasClass("scroll-to-fixed-fixed") && $('section#skin_header').find(".site_logo").length > 0) {
            //do nothing
        }
        else {
            $('.site_logo').prependTo($("#skin_topLeft"));
            $("div.site_logo a img").attr("src", "/dnn/Portals/0/Images/FG/fglogo.png");
        }
    });
});

0 个答案:

没有答案