Have you tried

$(document).ready(function(){

$('.moreInfoLink').bind("click",function(){
 $(this).parents('tr').next('tr.hidden').toggle();
 return false;
});
});

From my experience i find parents more useful than parent because with the latter you have to be sure it is really the element you are after.


-- David


Alexandre Plennevaux schreef:
hello friends,
a quickie: In my table, each table row contains a div in the last cell that, when click, should show()/hide() the very next TR.HIDDEN element. I tried this, but it does not work. I'm a bit confused on the use of next() as you can see: $(document).ready(function(){ $('.moreInfoLink').bind("click",function(){
  $(this).parent().next('tr.hidden').toggle();
  return false;
 });
});
can you tell me what i'm doing wrong? Thank you ! Alexandre

Reply via email to