In this jsFiddle
am I trying to pass an argument to a function, but it doesn’t receive the argument or it isn’t executed.
<a href="javascript:addRemove('7249');">Details</a>
JQuery
$(document).ready(function() {
function addRemove(u) {
alert(u);
}
});
Any ideas what’s wrong and how to fix it?
http://jsfiddle.net/EcCTx/2/
Your code was wrapped in an onload event by jsfiddle (drop-down menu on the left). So if you add a function it won’t be global, but your onclick event calls a global function by the name
addRemove.