我正在使用System.Web.Optimization.dll来捆绑我的javascript文件 我有2个不同的Bundle
var jsBundle = new ScriptBundle("~/Content/scripts/jsBundle")
.Include("~/Content/scripts/external/modernizr.2.6.2.js") // 2.6.2
.Include("~/Content/scripts/external/jquery.js") // 1.9.1 min
.Include("~/Content/scripts/external/jquery.migrate.js") // 1.1.1 min
.Include("~/Content/scripts/external/jquery-ui.js") // 1.10.2
.Include("~/Content/scripts/external/jquery.cookie.js")
.Include("~/Content/scripts/external/jquery.touchpunch.js") // 0.2.2
.Include("~/Content/scripts/external/jquery.toggle.button.js")
.Include("~/Content/bootstrap/js/bootstrap.js") //2.3.2
.Include("~/Content/mcustomscrollbar/mCustomScrollbar.concat.min.js")
.Include("~/Content/scripts/external/jquery.masonry.min.js") //2.1.08
.Include("~/Content/scripts/external/jquery.jnotify.min.js")
.Include("~/Content/scripts/external/jquery.dynatree.js")
.Include("~/Content/scripts/external/jquery.form.js")
.Include("~/Content/scripts/external/WhenReady.js")
.Include("~/Content/scripts/external/bbq.js")
.Include("~/Content/scripts/external/select2.js")
.Include("~/Content/scripts/external/jquery.unobtrusive-ajax.js")
.Include("~/Content/scripts/external/jquery.querystring.js")
.Include("~/Content/scripts/external/jquery.dropdown.js")
.Include("~/Content/scripts/external/jquery.hotkeys.js")
.Include("~/Content/scripts/kendo/kendo.all.min.js")
.Include("~/Content/scripts/external/wysiwym/showdown.js")
.Include("~/Content/scripts/external/wysiwym/wysiwym.js")
.Include("~/Content/scripts/external/jquery.poshytip.js")
.Include("~/Content/scripts/external/ToolTips.js")
.Include("~/Content/scripts/external/jquery.placeholder.js")
.Include("~/Content/scripts/external/jquery.selection.js")
.Include("~/Content/scripts/external/snap.js")
.Include("~/Content/scripts/external/chosen.jquery.js")
.Include("~/Content/scripts/external/jquery.elevatezoom.js");
jsBundle.Orderer = nullOrderer;
bundles.Add(jsBundle);
和
var calendarJsBundle = new ScriptBundle("~/Content/external/calendarJsBundle")
.Include("~/Content/scripts/external/FrontierCalendar/colorpicker/colorpicker.js")
.Include("~/Content/scripts/external/FrontierCalendar/jquery-qtip-1.0.0-rc3140944/jquery.qtip-1.0.js")
.Include("~/Content/scripts/external/FrontierCalendar/lib/jshashtable-2.1.js")
.Include("~/Content/scripts/external/FrontierCalendar/frontierCalendar/jquery-frontier-cal-1.3.2.js");
calendarJsBundle.Orderer = nullOrderer;
bundles.Add(calendarJsBundle);
当我将两者合并在一起时,我的初始化方法无法被浏览器识别。
这行代码正常运行
$('#mycal').initialize("/admin/Events/CalendarNextView", "True", "20", "/brainbank-default/admin/Events");
但是将两者合并在一起之后 我得到了Uncaught TypeError:$(...)。initialize不是函数