Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 142100

how to change the src path to an image with jquery

$
0
0

The path to an image looks like this:

<img src="uploads/image1.jpg">

The image is visible when on index.php in the same directory as uploads is. But for my admin, i use a subdirectory admin. So to view the image, the path now should be

<img src="../uploads/image1.jpg">

Is it possible to add the ../ before the uploads with jquery? and how can i do that?

I want to make this work for all images in the uploads folder!


Viewing all articles
Browse latest Browse all 142100

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>