动画Gif在FireFox 18.x中不起作用

时间:2013-02-13 22:59:37

标签: jquery asp.net animation

我在网页中有以下代码。我发现如果我删除了window.location的javascript,那么动画gif会正确显示动画,否则它总是显示为冻结。这不会发生在IE中。有没有解决这个问题?

       <script type="text/javascript">



        function Redirect() {

            jQuery.fn.center = function () {
                this.css("position", "absolute");
                this.css("top", ($(window).height() - this.height()) / 2 + $(window).scrollTop() + "px");
                this.css("left", ($(window).width() - this.width()) / 2 + $(window).scrollLeft() + "px");
                return this;
            }


            $('#wrapperDiv').center();

            $('#imgDiv').html('<img src="../Images/ajaxLoading2.gif" alt="Loading..." />');

           $('#imgDiv').css("display", "block");

            window.location = '<%=RedirectURL %>';

        }

        $(document).ready(function () {

        });

    </script>

1 个答案:

答案 0 :(得分:0)

我认为这可能只是你无法改变的事情。我已经在IE中看到过这种情况,在重定向页面时它会停止GIF动画。

相关问题