【问题标题】:Dialog jquery doesn't work对话框 jquery 不起作用
【发布时间】:2014-06-21 01:49:12
【问题描述】:

我的对话框没有显示,你能帮帮我吗?

HTML:

<li><a href="#" id="chopen">Character</a></li>
<div id="character" title="Character">
    <p>you charcter here</p>
</div>

和js:

$(function () {
    $("#character").dialog({
        autoOpen: false,
        modal: true,
        show: "blind",
        hide: "blind"
    });
    $("#chopen").click(function () {
        $("#character").dialog("open");
        return false;
    });
});

ofc all in document.ready

【问题讨论】:

标签: jquery html jquery-ui dialog


【解决方案1】:

你已经安装插件 jquery UI 了吗?

如果还没有,您必须安装插件 jquery UI 版本,因为 jquery 对话框依赖于 jquery UI 库。如下:

<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>

也可以从jQueryUI下载这个库

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-06-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多