jQuery Breaks in MVC4
I have jQuery, jQuery Mobile and jQuery-UI included in my MVC4 project. I am having a problem where the jQuery-UI script only loads if the page is refreshed, otherwise the jQuery-UI will not load initially.
I have tried moving the include script to the bottom of the page instead of including it in the top. This seems to work 80% of the time with one side effect. When I post some data to the server, I would get two posts instead of one.. ugh! I seem to be stuck and I can find anything on Google that will help alleviate my problem. Any help or guidance will be appreciated.
Thanks!
Here is some added code
Here is my _layout.cshtlm
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@ViewBag.Title - My ASP.NET MVC Application</title>
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl("~/Content/css")" rel="stylesheet" type="text/css" />
<link href="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl("~/Content/themes/base/css")" rel="stylesheet" type="text/css" />
<link type="text/css" href="~/Content/jquery-ui-1.8.21.custom.css" rel="stylesheet" />
<script src="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl("~/Scripts/js")" type="text/javascript"></script>
<script src="@Url.Content("http://code.jquery.com/jquery-latest.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.21.custom.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.multi-accordion-1.5.3.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/myjQuery.js")" type="text/javascript"></script>
<meta name="viewport" content="width=device-width" />
</head>
<body>
<div>
<header>
<script>
</script>
<div class="content-wrapper wrappingBorder bottomRound shadow" style="background-color:White;margin:0 auto 30px auto;">
<div class="float-left">
<p class="title">NTI Project Management</p>
</div>
<div class="float-right">
@*<section id="login">
@Html.Partial("_LoginPartial")
</section>*@
<nav>
<ul id="menu">
<li >@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("Projects", "Index", "Project")</li>
<li>@Html.ActionLink("Profile", "Contact", "Home")</li>
<li>@Html.ActionLink("Logout", "Index", "Logout")</li>
</ul>
</nav>
</div>
</div>
</header>
@*Start of main content*@
<div id="body">
<section class="content-wrapper main-content clear-fix allRound shadow">
@RenderBody()
</section>
</div>
<footer>
<div class="content-wrapper">
<div class="float-left">
<p style="font-size: 14px">© @DateTime.Now.Year - 3M</p>
</div>
</div>
</footer>
</div>
</body>
</html>