I\'ve created an MVC 4 using the default template, where @Script.Render(~\"bundles/jquery\")
is called after @RenderBody()
. As per this post, this
Create a new section MyScripts below all other library scripts
_Layout
@Scripts.Render("~/bundles/jquery")
@RenderSection("scripts", required: false)
@RenderSection("MyScripts", required: false)
MyView
@section MyScripts {
<script type="text/javascript">
$("#eta_table");
...
</script>
}
Now your custom page scripts only get loaded once after jQuery is loaded.