the problem im having is that i have a next and previous link that selects the next div with a class of "thumb", however these are grouped into sets of 4 within another div
eg <div class="image_set"> <div class="thumb" id="1"> <div class="thumb" id="2"> <div class="thumb" id="3"> <div class="thumb" id="4"> </div> <div class="image_set"> <div class="thumb" id="5"> .......etc. and my jquery is.... var nextLink = $(".thumb[id=" + newID + "]").next('.thumb').attr('id'); $("a#rightLink").attr("href", nextLink); var prevLink = $(".thumb[id=" + newID + "]").prev('.thumb').attr('id'); $("a#leftLink").attr("href", prevLink); basicaly when the link is clicked it refreshes the links with a new href to go to the next thumb, but when i get to the last one of a set (in my example 4) in obviously doesnt move to 5 because it only finds siblings, im sure its a simple work around but i cant figure it out thanks in advance for any help. Alex -- View this message in context: http://old.nabble.com/how-to-get-around-jquery-.prev-and-.next-siblings.-tp26389767s27240p26389767.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.