开发者

Conflict with the loading image when using continuous fading Effects

In my website I've added a newsletter button that has a continuous flashing effect (black to red) using fading effects with jquery and it works fine.

Keeping in mind that I'm using Ajax to get the content of pages without refreshing the page.

When loading the page it shows animated loading image while the page loading and its all working fine also.

but I've noticed that the loading image does not animate on IE and I've found that the flashing of the button causes that.

this issue exists only on IE. Do you have any Ideas to solve this Issue?

the Code I'm using is:

jQuery(document).ready(function($) {

//This function used to make the button flashing
flick();
    function flick(){
        $("#newsletter_btn1").fadeIn(1000,function(){
            $("#newsletter_btn1").fadeOut(1000,function(){flick();});         
        });
    }

//This part is showing the loading div and then hides the existing content then loads the page request then hides the loading image
// Loading image is .gif animated 

 $(".loading").fadeIn(100,function(){
                $mainContent.fadeOut(100,function(){
                    $.get(url, {"ajaxed": "true"} ,function(data, status, xmlHttp) {
                        var containe开发者_运维技巧r = $("<div></div>");
                        container.html(xmlHttp.responseText);
                    var content = $(".inner",container).html();
                        $mainContent.html(content).fadeIn(900,function(){
                            $(".loading").fadeOut(1000);
                        });                        

                    });

                });
            });
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜