I have defined a bundle:
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-1.8.3.min.js"));
My layout looks like this:
<!DOCTYPE HTML>
<html lang="en-US" dir="ltr">
<head id="ctl00_Head1">
<title>Test</title>
@*<script src="@Url.Content("~/Scripts/jquery-1.8.3.min.js")" type="text/javascript"></script>*@
@Scripts.Render("~/bundles/jquery")
</head>
<body id="UCG">
@RenderBody()
<script type="text/javascript">
$(document).ready(new function () {
alert('test');
});
</script>
</body>
</html>
My View is minimal and insignificant. I have no idea why ASP.MVC (4) doesn't load jQuery using bundles while commented, standard
include the unminified version (jquery-1.8.3.js). As bundles already minify files, it doesn't work if they are already minified
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With