Object不支持此属性或方法 - jquery simple modal popup

时间:2011-09-14 13:44:30

标签: jquery simplemodal

我的代码运行如下,

    <script src="../../Content/js/jquery.simplemodal.js" type="text/javascript">      </script>
    <script src="../../Content/js/jquery.js" type="text/javascript"></script>
    <script src="../../Content/js/basic.js" type="text/javascript"></script>
    <link href="../../Content/css/basic.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/css/basic_ie.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">

function Add(id) {
    $.ajax({
        type: "POST",
        url: "/Home/Details",
        data: { Id: id },
        success: function (result) {
            $.modal(result);

        },
        error: function (req, status, error) {
            alert(error + req + status);
        }
    });
}

按钮单击会触发此添加javascript方法,但不会在模式弹出窗口中打开页面。帮助解决这个问题。

1 个答案:

答案 0 :(得分:3)

需要在jQuery.js之后加载jQuery.simplemodal.js