In a multilanguage website when changing the img.src attribute in jQuery, it looks for base url + src
which becomes something like http://localhost/app/en/resources/images/img.jpg
assuming base url
is http://localhost/app/en/
and src
is resources/images/img.jpg
In fact the img.jpg
file is not under en
folder so this should be omitted from the above location.
How can I do this?
You have two options:
Give the absolute URL: http://www.google.com/...../image.png
Give relative URL, two folders up: ../../image.png