My DOM looks like this:
-
For more information. I try setting src attribute with attr method in jquery for ad image using the syntax for example: $("#myid").attr('src', '/images/sample.gif');
This solution is useful and it works but if changing the path change also the path for image and not working.
I've searching for resolve this issue but not found nothing.
The solution is putting the '\' at the beginning the path:
$("#myid").attr('src', '\images/sample.gif');
This trick is very useful for me and I hope it is useful for other.