Is there a way for me to successfully send the parameter counter
to my BindUnbind()
function?
<div id="adver-list">
@{
var counter = 1;
foreach (var adver in (IEnumerable<string>)ViewBag.AdverImages)
{
<div class="adver-image">
<img class="uploaded_image" src="@Url.Content(adver)" alt="advertisement"/>
<input class="hover-delete" id='@adver' type="button" onclick="DeleteAdver(this)"/>
</div>
counter += 1;
}
<script type="text/javascript">
$(document).ready(function () {
BindUnbind(counter, 1); // trying to figure out how to pass the counter here
});
</script>
}
</div>
I appreciate your help!