I forgot to say that i need to use $('.first li a').bind('click',function() 'couse with the var pathImg = $(this).attr('href');
i get the href of the clicked element. Diego --- Ven 7/11/08, diego <[EMAIL PROTECTED]> ha scritto: Da: diego <[EMAIL PROTECTED]> Oggetto: [jQuery] $(this).next() doesn't work A: "jQuery (English)" <jquery-en@googlegroups.com> Data: Venerdì 7 novembre 2008, 10:17 Hi all. how can i addClass from the clicked element <li><a> to the next <li>? i've tried this $('.first li a').bind('click',function() $(this).next('li').addClass('second'); }); but won't work, the original code : <div class="first> <ul> <li><a href="#"><img/></a></li> <li><a href="#"><img/></a></li> <li><a href="#"><img/></a></li> <li><a href="#"><img/></a></li> </ul> </div> and clicking on the first $('li a') the output code should be : <div class="first> <ul> <li><a href="#"><img/></a></li> <li class="second"><a href="#"><img/></a></li> <li><a href="#"><img/></a></li> <li><a href="#"><img/></a></li> </ul> </div> any idea ?? Tnx in advance Diego Unisciti alla community di Io fotografo e video, il nuovo corso di fotografia di Gazzetta dello sport: http://www.flickr.com/groups/iofotografoevideo