I having a issue while bundling by JavaScript files through Bundling in .NET MVC4
I am adding following scripts to bundle up in my code
bundles.Add(new ScriptBundle("~/bundle").Include("~/Scripts/jquery-1.9.1.min.js","~/Scripts/kui/kendo.all.min.js", "~/Scripts/kui/kendo.grid.min.js", "~/Scripts/jquery.validate.min.js"));
Everything works fine till here, but When I Add jquery.unobtrusive-ajax.min.js
to the list:
bundles.Add(new ScriptBundle("~/bundle ").Include("~/Scripts/jquery-1.9.1.min.js","~/Scripts/jquery.unobtrusive-ajax.min.js","~/Scripts/kui/kendo.all.min.js", "~/Scripts/kui/kendo.grid.min.js", "~/Scripts/jquery.validate.min.js"));
All scripts stops working (Validation, Kendo UI etc.) and I get this exception through Visual Studio JS debugger:
Microsoft JScript runtime error: Object doesn't support this property or method
With below code highlighted in the generated bundles script file:
n("a[data-ajax=true]").live("click",function(n){n.preventDefault(),r(this,{url:this.href,type:"GET",data:[]})}),n("form[data-ajax=true] input[type=image]").live( ….
And on moving forward nothing (JavaScript/Jquery related) works anymore.
Probably there is conflict in JS file with var or function names? But it’s very hard to trace out in a long minified and bundled script file. Kindly help.