I am looking to pass the value of the target from a script to a division tag in MVC. Below are the codes I have implemented.
Script:
@section Scripts{
<script type="text/javascript">
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var target = $(e.target).attr("link") // activated tab
alert(target);
});
</script>
}
DIV: (outer division)
<div class="ibox-title">
<h5><i class="fa fa-newspaper-o"></i> News & Events</h5>
<div class="ibox-tools">
<a href="@Url.Action("List","News")" style="color: #00a650;font-weight:600;">View All</a>
</div>
</div>
I simply want the value of the target to be displayed inside this division.
Moreover, in the line where it says:
News in @URl.Action("List","News")
should be replaced by the value of the target.