相关疑难解决方法(0)

创建一个JQuery Mobile对话框

我正在尝试创建一个对话框Jquery mobile.我试图在这个SO问题中提到已接受的答案,但它对我不起作用.

这是我的代码:

 <div data-role="page" id="first"> 
    <!-- Code -->  
    <div id = "dialog" data-rel="dialog">
        <div id = "errorText"></div>
        <button id = "closeDialog">OK</button>
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

这里是JS(在函数内部):

//Nothing checked. Cannot continue. Add error message to div
$('#errorText').html("You must check the checkbox next to \"I Agree\" to continue");
//Open Dialog
$('#dialog').dialog();
Run Code Online (Sandbox Code Playgroud)

当达到创建对话框的代码时,没有任何反应.建议?

jquery jquery-mobile

14
推荐指数
2
解决办法
6万
查看次数

标签 统计

jquery ×1

jquery-mobile ×1