Working with multiple same elements jQuery
in Using jQuery
•
10 years ago
I don't know if the title describes the problem correctly so the problem is as follows. If I have multiple elements with same classes or the elements are same like:
<a href="Link"><img class="slider_image" src="url"></a>
<a href="Link"><img class="slider_image" src="url"></a>
<a href="Link"><img class="slider_image" src="url"></a>
<a href="Link"><img class="slider_image" src="url"></a>
These are slider images. What I want to do is get the the link of image and attribute both differently and I want to use them elsewhere, maybe in a different way, like I want the images to point to the same <a>
attribute but I want to use them in a different slider.
I've tried as far as I could, I can use the images in a different way, but I'm not able to grab the href
attribute of a
and use them on the same images they are pointing to like in the above example.
Is there a way I can do it?