开发者

Colorbox and Ajax.ActionLink not working well together

When I attempt to get my actionlink to call the colorbox to open it keeps returning "colorbox is not a function"

    @Html.DropDownList("JobTypeId", String.Empty) | @Ajax.ActionLink("Add Job Type", "AddJobType",
                                                               new AjaxOptions
                                                               {
                                                                   UpdateTargetId = "inline_form",
                                          开发者_如何学编程                         InsertionMode = InsertionMode.Replace,
                                                                   HttpMethod = "GET", 
                                                                   OnSuccess = "openbox();"
                                                               })

//in header

    <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>

Colorbox and Ajax.ActionLink not working well together

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜