javascript - jQuery - fadeIn 仅在 Firefox 中不起作用

标签 javascript jquery firefox

我正在编写一个脚本,该脚本会在一段时间后隐藏和显示一些 div。

这是我完整的 jQuery 代码:

    <script type="text/javascript">
    $.noConflict();
    jQuery(document).ready(function($){     
        $("#SuperWebF1").click(function(){
        if ($('[name="shipping_method"]', window.parent.document).is(':checked')){
        billing.save();     
        $("#LoadingDiv", window.parent.document).show().delay(4300).fadeOut();
        $("#OutDiv", window.parent.document).hide().delay(5000).fadeIn();
        $('#OutDiv', window.parent.document).removeClass('outerdiv');
        $('#OutDiv', window.parent.document).removeClass('outerdivNoAdress');

        setTimeout(function() {
        if( $('#DisplayMe').length ){
           $('#OutDiv', window.parent.document).addClass('OuterDiv1000');
        } else {
           $('#OutDiv', window.parent.document).addClass('OuterDiv1000No');
        }
        }, 5100);


        $('#InnerIframe', window.parent.document).removeClass('FrameCSS');
        $('#InnerIframe', window.parent.document).removeClass('FrameCSSNoAdress');
        $('#InnerIframe', window.parent.document).addClass('FrameCSS1000');
    }else {
    alert('Моля, изберете начин на доставка!');
    }   

        })
    });
    </script>

问题出在那行:

        $("#OutDiv", window.parent.document).hide().delay(5000).fadeIn();

在用上面这行代码隐藏 div 之后,这行代码似乎没有显示 #OutDiv 元素。

我可以确认我只在使用 Firefox Mozilla 时遇到这个问题。 在 Windows 和 Linux 上的 Firefox 上进行了测试,在这两个地方我都遇到了这个问题。 两种浏览器都是最新的。

你有什么建议吗?

最佳答案

尝试使用这个

window.parent.$(elementid));

关于javascript - jQuery - fadeIn 仅在 Firefox 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26870735/

相关文章:

javascript - 用于电话验证的正则表达式

javascript - 如何使用 Greasemonkey 重新组织 <ul> 列表?

javascript - JQGrid : How to get Selected Row ID of Custom "Delete" column

javascript - 在新选项卡中以可读格式显示 json

javascript - 带有百分比指示器的 Angular 2+ 应用程序预加载器

php - 单击更改 css

jquery - ajax 不适用于 firefox 但适用于 chrome

css - Font Awesome 图标在 Firefox 中对齐错误

macos - 如何在 Firefox 中允许键盘焦点链接?

javascript - 当我在 google chrome 浏览器上运行我的本地 webRTC 应用程序时,没有生成 ICE 候选人