Colorbox和Ajax.ActionLink不能很好地协同工作

时间:2011-05-24 22:40:28

标签: asp.net-mvc-3 colorbox

当我尝试让我的actionlink调用colorbox打开时,它会一直返回“colorbox不是函数”

    @Html.DropDownList("JobTypeId", String.Empty) | @Ajax.ActionLink("Add Job Type", "AddJobType",
                                                               new AjaxOptions
                                                               {
                                                                   UpdateTargetId = "inline_form",
                                                                   InsertionMode = InsertionMode.Replace,
                                                                   HttpMethod = "GET", 
                                                                   OnSuccess = "openbox();"
                                                               })

//在标题

    <script src="@Url.Content("~/Scripts/jquery.colorbox-min.js")" type="text/javascript"></script>
    <script type="text/javascript">
        function openbox() {
            $.colorbox({ width: "50%", inline: true, href: "#inline_form" });
        }
    </script>

enter image description here

0 个答案:

没有答案
相关问题