This isnt working, not sure what is wrong. I dont want to use href onclick at all, i usually use an id on ahref links then execure javascript that way but i need to pass parameters from the link to the function, not sure if there are other alternatives?
code using the parameters isnt shown, its basiacly a forum link but its loading the topic into a div
function changetotopicdetails(topicid, topicname) {
$('#loadingAjaxs').show();
$('#flubestext').hide();
<a href="javascript:changetotopicdetails(@following.Id, @following.ShortName);">@following.Title</a>
I would usually do something like
$('#changeuserstwohour').click(function () {
$('#userswrap').load('@Url.Action("TrendingUsersMenutwohr", "Trending")');
});
but by doing so i cant send parameters to the function during a loop (list of topics)
any suggestions?
Answers pointed out that i need the variables passed to a new {}
$('#changeuserstwohour').click(function () {
$('#userswrap').load('@Url.Action("TrendingUsersMenutwohr", "Trending", new {@theid = id, @thename = name})');
});