I try to pass a variable from onclick another function. The content is created at runtime so I use on() of JQuery and don’t know how to pass the variable.
<a class="call" href="#" onclick="call('.$id['id'].');">...</a>
Here the js:
$('.call').on("click", function(id) {
alert(id);
});
The alert responds [object Object]
Are not you supposed to be like?
How about