jQuery Mobile中的弹出窗口无法正常工作,请咨询 [英] Popups in jQuery Mobile not working as intended, please advice

查看:137
本文介绍了jQuery Mobile中的弹出窗口无法正常工作,请咨询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

jQuery Mobile中的弹出窗口无法正常工作,请提出建议.

Popups in jQuery Mobile not working as intended, please advice.

弹出式DIV仍然可见,人们希望DIV被隐藏并且单击链接时不会弹出.它似乎可以在jQuery文档的演示中使用.

The popup DIV is still visible,one would expect that DIV to be hidden and it doesnt popup when the link is clicked.It seems to work in the demos in jQuery docs.

下面的代码有问题吗?

<a href="#transitionExample" data-transition="pop" data-role="button" data-inline="true" data-rel="popup">Pop Up</a>
     <div data-role="popup" id="transitionExample">
     This is a POP UP.
    </div>

推荐答案

HTML

<p>You have entered: <span id="dialogoutput"></span></p>

    <a href="#" id="dialoglink" data-role="button">Open Dialog</a>

jQuery

$(document).delegate('#simplestring', 'click', function() {
  $(this).simpledialog({
    'mode' : 'string',
    'prompt' : 'What do you say?',
    'buttons' : {
      'OK': {
        click: function () {
          $('#dialogoutput').text($('#dialoglink').attr('data-string'));
        }
      },
      'Cancel': {
        click: function () { },
        icon: "delete",
        theme: "c"
      }
    }
  })
})

引用:_

http://jquerymobile.com/branches/popup-小部件/docs/pages/popup/index.html

http://dev.jtsage.com/jQM-SimpleDialog/demos/string.html

这篇关于jQuery Mobile中的弹出窗口无法正常工作,请咨询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆