【问题标题】:jQuery Mobile application when iframe inserted Back button does not functionjQuery Mobile 应用程序当 iframe 插入后退按钮不起作用
【发布时间】:2013-01-13 04:46:10
【问题描述】:

当我为在我的应用程序中播放的视频添加 iframe 时,jQuery UI 标题上的后退按钮不再起作用。

当我将 iframe 从代码中取出时,它会再次正常运行。想知道是否有人知道这里的修复是打开 iframe 的页面的代码。

<div data-role="page" id="about" data-add-back-btn="true" data-back-btn-text="Back" >

<div data-role="header" >
    <h1>About</h1>
</div><!-- /header -->

<div data-role="content">

    <div id ="aboutsection">
        <div id="about-logo"><img src="images/small-logo.png" /></div>

        <div id="video-thumb">
        <a href="#popupVideo" data-rel="popup" data-position-to="window"><img src="images/video-thumb.png"/></a>        
        <div data-role="popup" id="popupVideo" data-tolerance="15,15" class="ui-content">
                <iframe src="
                http://player.vimeo.com/video/54553882?portrait=0" seamless></iframe>
            </div>
        </div><!--/video-thumb-->
        <p>&#169; Be Active North-East</p>
    </div><!--/aboutsection-->
</div><!-- /content -->

<div data-role="footer" data-position="fixed">
    <h4>Be Active North East </h4>
</div><!-- /footer -->

【问题讨论】:

    标签: jquery jquery-mobile video iframe


    【解决方案1】:

    我有类似的问题,用这个js得到了很好的结果;

    function goBack(){
        var url = $.mobile.urlHistory.getPrev().url;
        if (url === null || url == "") url = $.mobile.firstPage.attr("data-url");
        $.mobile.changePage(url, "slide", true, true, true);
    }
    

    还有这个后退按钮

    <a href="" data-role="button" data-inline="true" data-icon="back" onclick="goBack()">Back</a>
    

    【讨论】:

      猜你喜欢
      • 2012-09-16
      • 1970-01-01
      • 1970-01-01
      • 2012-10-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多