I am attempting to display a spinner on an overlay within a partial view while loading another partial view. However, it is displaying where the div was originally declared.
Index.cshtml
<div id="DivEmailContainer" style="display:block" class="row">
@Html.Partial("_DisplayContactEmail",Model)
</div>
<div id="spinnerdiv" style="display:none;">
<i class="fa fa-spinner fa-pulse fa-3x"></i>
</div>
_DisplayContactEmail.cshtml
<td class="">
@Ajax.ActionLink(
"Edit",
"GetEditEmail",
new { CommunicationLocation = commemail.Location },
new AjaxOptions()
{
HttpMethod = "Get",
UpdateTargetId = "DivEmailContainer",
InsertionMode = InsertionMode.Replace,
LoadingElementId = "spinnerdiv"
},
new { @class = "linkbutton" })
</td>
It's supposed to appear on top of the partial view.
What could be causing this issue?