加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

javascript – 无法在jQuery Mobile中使用弹出窗口

发布时间:2020-12-14 23:08:01 所属栏目:资源 来源:网络整理
导读:我确信我只是遗漏了一些基本的东西,但任何人都可以看到以下代码有什么问题吗?当我单击第一个按钮时,它不会打开弹出窗口.第二个按钮将弹出窗口作为对话框打开.

我确信我只是遗漏了一些基本的东西,但任何人都可以看到以下代码有什么问题吗?当我单击第一个按钮时,它不会打开弹出窗口.第二个按钮将弹出窗口作为对话框打开.


最佳答案
确实,这是你遗失的一件小事! =)

jQuery 1.3 Mobile Pop-up Docs

…then create a link with the href set to the id of the popup div,and add the attribute data-rel=”popup” to tell the framework to open the popup when the link is tapped. This is a similar markup pattern to the dialog widget. A popup div has to be nested inside the same page as the link.

移动< div id =“menu-items”>< / div>在< div id =“home”data-role =“page”>< div>内节点,那应该是它!

包括jsFiddle工作.自jQuery Mobile 1.4.0起,Dialogs已弃用,将在1.5.0中删除.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读