开发者

Colorbox and Ajax.ActionLink not working well together

开发者 https://www.devze.com 2023-03-07 23:57 出处:网络
When I attempt to get my actionlink to call the colorbox to open it keeps returning \"colorbox is not a function\"

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

精彩评论

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