jquery模式在asp.net mvc中弹出

jquery modal pop up in asp.net mvc

本文关键字:mvc net 模式 asp jquery      更新时间:2023-09-26

我正在尝试复制我在这里看到的示例http://jqueryui.com/dialog/#animated使用以下asp.net mvc视图

@{
    ViewBag.Title = "Partial";
}
    <script>
        $(function () {
            $("#dialog").dialog({
                autoOpen: false,
                show: {
                    effect: "blind",
                    duration: 1000
                },
                hide: {
                    effect: "explode",
                    duration: 1000
                }
            });
            $("#opener").click(function () {
                $("#dialog").dialog("open");
            });
        });
</script>
    <div id="dialog" title="Basic dialog">
        <p>This is an animated dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
    </div>
    <button id="opener">Open Dialog</button>

    @section scripts{
        @Scripts.Render("~/Scripts/jquery-1.10.2.js")
        @Scripts.Render("~/Scripts/jquery-ui-1.8.11.js")
        }

但是jquery没有启动,我不确定我是否正确地链接了jquery脚本或者什么。。。

我也试过这个

<script src="@Url.Content("~/Scripts/jquery-1.10.2.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui.js")" type="text/javascript"></script>

在页面顶部,但没有

最终,我的目标是使用@Ajax.ActionLink(它对我很有用),然后将随部分视图更新的"div"制作成模式弹出窗口。但现在,我还不能让这个模式正常工作,我很感激

的帮助

这是的引号

<script src='@Url.Content("~/Scripts/jquery-1.10.2.js")' type="text/javascript"></script>
<script src='@Url.Content("~/Scripts/jquery-ui.js")' type="text/javascript"></script>