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>
精彩评论