I am using the latest MVC framework and bundles.
The default "jqueryval" bundle that MVC creates is causing a javascript error
The scripts on my page are output like so
<!-- In head -->
<script src="/Scripts/modernizr-2.6.2.js"></script>
<script src="/Scripts/jquery-2.0.2.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="/Content/Misc.js"></script>
<!-- Bottom of doc -->
<script src="/Scripts/jquery.unobtrusive-ajax.js"></script>
<script src="/Scripts/jquery.validate.unobtrusive.js"></script>
My Bundle:
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.validate*",
"~/Scripts/jquery.unobtrusive*"));
What is going wrong?
jquery.validate.js
andjquery.validate.unobtrusive.js
(in that order)? Why isjquery.unobtrusive-ajax.js
being output? I thinkvalidate.unobtrusive
needsvalidate
– Yeanvalidate.unobtrusive
file doesn't have the code it needs. So it's not a problem of order - it's a problem of getting the right files in the bundle. I'll see what I can find. You might want to change your question to address this problem, so others may be able to help better – Yean