zoukankan      html  css  js  c++  java
  • js 滚动加载iframe框中内容

        var isIE6 = !!window.ActiveXObject&&!window.XMLHttpRequest;
    
        //滚动加载
        var scrollLoad =function(){
            $("#content iframe[_src]").each(function(){
                    var t = $(this);
                    if( t.offset().top<= $(document).scrollTop() + $(window).height()  )
                    {
                        t.attr( "src",t.attr("_src") ).removeAttr("_src");
                    }
            });//each E
        }
    
        scrollLoad();
        $(window).scroll(function(){ 
            if(isIE6){ btb.css("top", $(document).scrollTop()+30) }
            //scrollLoad();
        });
    <iframe allowTransparency="true" scrolling="no" _src="demo/iframe/2.0-focus-iframe.html?&fade&true" frameborder="0"></iframe>
    

      

  • 相关阅读:
    团队冲刺第五天
    每日学习
    团队冲刺第四天
    团队冲刺第三天
    每日学习
    2021.4.12
    2021.4.10
    2021.3.18
    2021.3.15
    2021.3.14
  • 原文地址:https://www.cnblogs.com/laneyfu/p/5042011.html
Copyright © 2011-2022 走看看