I am trying to change the image src attribute using jQuery
jQuery(\"#imageID\").attr(\'src\',\'http://localhost:8080/images/1/myImage.png\' );
You would need to strip the url(
and closing )
parts out for that to work.
So url(http://localhost:8080/images/1/myImage.png)
becomes
http://localhost:8080/images/1/myImage.png
You could do this with a substring, a regex replace or any method of your choosing.
http://www.w3schools.com/jsref/jsref_replace.asp
Perhaps:
jQuery("#imageID").attr('src',jQuery("#imageBlock").css('background-image').replace('url(','').replace(')','') )