Hi,
I got a generated list of links where every link has an unique id(number) and a class called "load".
I would like to change a picture on the other side of the page with the same number in the id as the link I clicked. Since id on elements are unique, i added folderid[number] infront of all the images
This is what i have so far (not working). I'm not sure if this is even close to correct but it feels like it :)
$(function(){
$(".load").click(function(){
var element = $(this);
var link_id = element.attr("id");
alert(link_id);
$("#folderid", link_id).attr("src", "img/folder_open.gif")
});
});
My pictures and links looks like this in the code:
<img src="img/folder.gif" id="folderid5" class="img_folder" alt="Folder"/>
<a href="#" id="5" class="load img_id5">
Thanks