I am trying to change the image src attribute using jQuery
jQuery(\"#imageID\").attr(\'src\',\'http://localhost:8080/images/1/myImage.png\' );
You need to extract the url part:
var backgroundImage = $("#imageBlock") .css('backgroundImage') .replace(/"/g,"") .replace(/url\(|\)$/ig, ""); jQuery("#imageID").attr('src', backgroundImage);