There are other ways to solve this, of course. Maybe you could put the links outside of the div with the text and then do something like: $('.more').click( function() { $(this).prev().toggle(); } );... Plenty of approaches. Take a look at jQuery's DOM traversal methods.