I’m trying to use jQuery to change the value of button.kill. However I don’t know how to access button.kill from within the get callback.
$("button.kill").click(function(){
$.get("file.php",{ nbRandom: Math.random() },
function(data){
//set button.kill text to data
});
});
There will be more than one button named kill and I want to ensure that I only update the one that the user has clicked.
Any pointers?
You could do