I am trying to change the image source in the Jquery
Either you have access to the ID when the JS is created, or you don't. If you don't then you'll have to find another way to target the item eg: $('.wanted')
$('.wanted')
If you do, then put it in: $('#')
$('#')