Hello everybody
Here is my jquery code and html table in the following file: http://www.nabble.com/file/p12836268/index.html index.html I have a simple table with id="myt" made with a simple structure: a <tr> row with class "personne" followed by a <tr> row with class "personne_info" then another <tr> row with class "personne" then another <tr> row with class "personne_info" and so on... i'd like to hide all <tr> row with class "personne_info" then if we clique on a tr with class "personne" make visible the next <tr> row with class "personne_info" if not or hide the next <tr> row with class "personne_info" if it's visible. In fact i'd like to have the same action then in the 10th code presented in page http://www.jquery.info/spip.php?article22 instead of <dl> <dd> <dt> i'd just want to to do that with <tr> and <td> i try to adapt this code to my need but my code don't workx very well i have to say and moreover it did'nt act the same way between ie6 and firefox 2 (i didn't try with ie7 for the moment...) Don't know why but in firefox 2 it hide or show the row it had to hide or show on my click but unfortunately it also add an additional space that ruined my presentation on each click... There is my full code in the file attached. my jquery code is: $(document).ready(function() { $('#myt').find('tr.personne_info').hide().end().find('tr.personne').click( function() { var answer = $(this).next("tr.personne_info"); if (answer.is(':visible')) { answer.slideUp(); } else { answer.slideDown(); } }); }); So Can you tell me what's wrong with this code. Additional question : how can i have the same action when you have to click on an image contained in my <tr> row with class "personne" that looks like: img id="action_a-string-id" Furthermore on each clik on this image i'd like to change the src of my img depending on the state (visible or hide) of the folowing <tr> row with class "personne_info" you know something like "row_extended.jpg" and "row_not_extended.jpg" Thanks by advance for your answers -- View this message in context: http://www.nabble.com/Problem-to-hide-and-show-a-%3Ctr%3E-tf4500895s15494.html#a12836268 Sent from the JQuery mailing list archive at Nabble.com.