I\'am trying to change \"onclick\" attribute in jQuery but it doesn\'t change, here is my code:
$(\'#stop\').click(function() { $(\'next\').attr(\'oncli
The easyest way is to change .attr() function to a javascript function .setAttribute()
$('#stop').click(function() { $('next')[0].setAttribute('onclick','stopMoving()'); }