Does anyone know why this isn't working, combination of 2 answers today. I'm just trying to get the parameter passed to show up in alert, everything else works so ignore the url action etc
$('#changetopicss').click(function () {
$('#loadingAjaxs').show();
$('#flubestext').hide();
var link = '@Url.Action("Detail", "Topics", new { @id = 304, @name = "newest", @forum = "all", @page = 0})';
var dataid = $(this).data(id);
// link = link.replace("-1", $(this).data(id));
// link = link.replace("-2", $(this).data(shortname));
window.alert(dataid);
$('#contentwrap').load(link, function () {
$('#loadingAjaxs').hide();
$('#flubestext').show();
window.history.pushState(null, 'title', '/topics');
});
});
</script>
<a id="changetopicss" data-id='@following.Id' data-shortname='@following.ShortName'>@following.Title</a>
everything else works, now trying to debug why i cant pass the data-id to window.alert as it wasn't working in url.action