首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >当iframe插入后退按钮时,jQuery移动应用程序不起作用

当iframe插入后退按钮时,jQuery移动应用程序不起作用
EN

Stack Overflow用户
提问于 2013-01-29 23:01:40
回答 1查看 710关注 0票数 3

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

当我把iframe从代码中去掉时,它又能正常工作了。想知道有没有人知道修复方法,这里是打开iframe的页面的代码。

代码语言:javascript
代码运行次数:0
运行
复制
<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 -->

EN

回答 1

Stack Overflow用户

发布于 2013-05-25 06:20:30

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

代码语言:javascript
代码运行次数:0
运行
复制
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);
}

这个后退按钮

代码语言:javascript
代码运行次数:0
运行
复制
<a href="" data-role="button" data-inline="true" data-icon="back" onclick="goBack()">Back</a>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14585875

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档