Hey guys,
I have a view that renders a partial view.
Index.cshtml
<script type="text/javascript" src="~/Scripts/jquery-2.1.1.js"></script>
<div class="tab-control" data-role="tab-control">
<ul class="tabs">
<li class="active">@Ajax.ActionLink(Resources.Base.Entry, "_List", "Entrada", null, new AjaxOptions() { UpdateTargetId = "_Content", InsertionMode = InsertionMode.Replace, LoadingElementId = "Div_Loading" })</li>
<li>@Ajax.ActionLink(Resources.Base.Data, "_Edit", "Entrada", null, new AjaxOptions { UpdateTargetId = "_Content", InsertionMode = InsertionMode.Replace, LoadingElementId = "Div_Loading" }, new { id = "Dados" })</li>
</ul>
<div class="frames" id="_Content">
@{Html.RenderPartial("_List");}
</div>
</div>
_List.cshtml
$(document).ready(function () {
$.get("@Url.Action("_Grid", "Data")", function (data) {
$('#con').replaceWith(data);
});
});
This view I do the jQuery include in it however in the partial view with this code above it says that jQuery does not exist. If I re-add the jquery over the code quoted above it works normal.
Is there a way to make all of my ajax requests after the load of the page have access to the included scripts?
All of them are being loaded at the bottom of the page (before the "")
Vlw!
Off: I noticed that there are some questions in Stackoverflow that are worth reputation, how can I ask a question like this?