Well, I didn't wrap my tr's in any tags, I had already read that in the old thread which now seems to be archived or something. I just tried the multiple tbody's.
I guess you're right that fadeIn("fast") seems to work, and I have to use fadeOut("fast") too, otherwise hide("fast") still makes sort of a glitch as the rows are hidden... On 14 Mar, 21:06, ricardobeat <ricardob...@gmail.com> wrote: > You can't wrap any element around <tr>s. Tables can only contain a > tbody/thead/tfoot and TRs, if you insert an element that is not > allowed, it itself will be wrapped by a new TR created by the browser, > and you'll get all kinds of misbehavior. You could insert a new tbody, > but browser handling of them is different. > > The problem is that the tbodies are being set to display:block after > the show('fast') call. Changing that to fadeIn('fast') seems to work, > I'm not sure why - both should restore the original display. > > cheers, > - ricardo > > On Mar 14, 1:47 pm, Lwangaman <donjohn.f...@gmail.com> wrote: > > > Ok let's see if this post works... The last couple tries didn't! > > > I was reading through this year-old thread which I found googling > > since I'm doing something similar, perhaps someone could give me a > > couple tips. > > > Here is the page with the example I'm dealing > > with:http://johnrdorazio.altervista.org/SitoFlatnukePersonale/index.php?mo... > > > Clicking on the checkboxes, two rows should appear (which were hidden > > from the beginning) in which more information can be inserted (that > > otherwise would not be necessary). > > > The only problem is, it seems to work only in Internet Explorer. In > > Firefox the rows wind up appearing at the bottom of the table, and > > every time you un-click and re-click some mysterious space begins > > accumulating. Not only, but the cells of the two appearing rows don't > > line up with the cells of all the other rows of the table, the seem to > > want to line up with only the first column which really opens up wide > > that first column shifting the whole table over to the right. Google > > Chrome presents a similar problem, only the appearing rows don't wind > > up at the bottom of the table. They stay where they're supposed to be, > > but the cells still don't line up and they shift the whole table, and > > un-click re-click still creates that mysterious gap. > > > At first I was applying JQuery directly to the rows that were > > involved, then reading this thread I tried creating different "tbody" > > sections and applying the JQuery to those sections, but the problems > > remain. Perhaps it could be a problem of parent-child relationships? > > I'm not sure how those work though, if anyone has any thoughts I would > > be very grateful. > > > Here is my code: > > > <script type="text/javascript" src="/SitoFlatnukePersonale/include/ > > javascripts/jquery.js"></script> > > <script type="text/javascript"> > > > $(document).ready(function(){ > > > $(".showhidesection").hide(); > > $("#pastoralcounsel").click(function(){ > > if ($("#pastoralcounsel:checked").val()!=null) > > { > > $("#represents").show("fast");} > > > else > > { > > $("#represents").hide("fast");} > > }); > > > $("#i_am_a_catechist").click(function(){ > > if ($("#i_am_a_catechist:checked").val()!=null) > > { > > $("#catechizes").show("fast");} > > > else > > { > > $("#catechizes").hide("fast");} > > }); > > > $("#volunteer").click(function(){ > > if ($("#volunteer:checked").val()!=null) > > { > > $("#volunteers").show("fast");} > > > else > > { > > $("#volunteers").hide("fast"); > > > } > > }); > > }); > > > </script> > > > <table class="sample"> > > > <tbody class="alwaysshowsection"> > > <tr><td><input type="checkbox" name="pastoralcounsel" > > id="pastoralcounsel"></td><td><label for="pastoralcounsel">Cons. > > Pastorale</label></td></tr> > > </tbody> > > > <tbody id="represents" class="showhidesection"> > > <tr><td>---</td><td><label for="i_represent"> -> rappresenta:</label></ > > td></tr> > > <tr><td>...</td><td><input type="text" name="i_represent" > > id="i_represent"></td></tr> > > </tbody> > > > <tbody class="alwayshowsection"> > > <tr><td><input type="checkbox" name="i_am_a_catechist" > > id="i_am_a_catechist"></td><td><label > > for="i_am_a_catechist">Catechista</label></td></tr> > > </tbody> > > > <tbody id="catechizes" class="showhidesection"> > > <tr><td>---</td><td><label for="i_catechize_this_group"> -> del > > gruppo:</label></td></tr> > > <tr><td>...</td><td><select name="i_catechize_this_group" > > id="i_catechize_this_group"><option>I^ Anno Comunioni</option></ > > select></td></tr> > > </tbody> > > > <tbody class="alwaysshowsection"> > > <tr><td><input type="checkbox" name="volunteer" id="volunteer"></ > > td><td><label for="volunteer">Volontario parrocchiale</label></td></ > > tr> > > </tbody> > > > <tbody id="volunteers" class="showhidesection">> > > <tr><td>---</td><td><label for="voluntaryservice"> -> servizio:</ > > label></td></tr> > > <tr><td>...</td><td><input type="text" name="voluntaryservice" > > id="voluntaryservice" /></td></tr> > > </tbody> > > > </table>