2
Good afternoon to all!
I have a question, it may be simple (or not).
You can change attributes?
Example, I have an img tag with a data-src attribute. I want to turn this data-src attribute into src.
Thus:
<img id="teste" data-src="link_da_imagem">
I want it that way:
<img id="teste" src="link_da_imagem">
Do you have any Javascript/Jquery function that does this?
Thank you!
EDIT
William, thank you!
The problem is, I’ll try to describe.
I have a store, that the products to sample, stay like this: http://image.prntscr.com/image/4b9f2d57b2734a38ad11ca8f86f53157.png
When you click on the small image, the big image changes (Changes in the case, to which small image you clicked)
I need, instead of looking like this, to have a carousel there, to move the images to the side, instead of clicking on the image and changing it. In case, stay like this: http://image.prntscr.com/image/5a895102389440d58526fc1e7f13361f.png
I’m using Owl-Carousel, which in this case is the script: http://owlgraphic.com/owlcarousel/demos/one.html
In the store, this products here: http://image.prntscr.com/image/4b9f2d57b2734a38ad11ca8f86f53157.png Only the large image is in SRC, the small ones (left side) are with data-src, so the Carousel does not work, put it shows only the tag that has SRC and not DATA-SRC. If you understand and can help, I appreciate it, if not, thank you in the same way! :)
Why do you wear
data-src
instead ofsrc
?– Giovane
Do you use any library? By default the right is
src
.– Mauro Alexandre
Just edit the HTML, no?
– Guilherme Nascimento
Look at my edited question, if you can, and if you can understand. Thank you!
– Lucas de Carvalho