your html is not valid: id's are supposed to be unique per page. chnage that and you'll see ff work fine.
Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ On 13/11/2009 06:38, Eric Cobb wrote: > Oh, the horror to see my beloved FireFox crash repeatedly when trying to > run some jQuery that works flawlessly in IE 8! (I thought it was > supposed to be the other way around!) > > Seriously though, I do have a chunk of jQuery that I hope someone here > can help me with. Basically, I have a (large) table that has a list of > users with IDs of "newUsers" and "oldUsers". I have a checkbox that > displays/hides the "oldUsers". In IE everything works instantaneously. > But in FireFox when you first check the box it takes several seconds > to hide the "oldUsers". Then, when you uncheck the box to display the > "oldUsers" again, it changes the display instantly but then the browser > hangs and crashes every time. > > Now, as I mentioned before this table is large, with somewhere around > 500 rows. Is this too much for FF/jQuery to handle? I thought about > breaking it up between 2 separate "newUsers" and "oldUsers" divs and > just toggle the display accordingly, but I'd rather do it in one table > if I could. > > -------- > Here's my jQuery: > > $(document).ready(function() { > //table striping > > $('table.stripe>tbody>tr:even').addClass("lite"); > $('table.stripe>tbody>tr:odd').addClass("dark"); > > //Display/Hide new and old user tables rows. > $("#userFilter").click(function(){ > // If checked > if ($("#userFilter").is(":checked")){ > //hide all old users > > $('table.stripe>tbody>tr:not(#newUsers)').hide(); > } > else { > //show all old users > > $('table.stripe>tbody>tr:not(#newUsers)').show(); > } > }); > }); > > > -------- > Here's my table: > > <table cellpadding="1" cellspacing="1" class="stripe"> > <tbody> > <tr id="oldUsers"> > <td>Old Test User</td> > <td align="center">Stuff</td> > <td align="center">Stuff</td> > <td align="center">Stuff</td> > </tr> > <tr > id="oldUsers"> > <td>Old Test User</td> > <td align="center">Stuff</td> > <td align="center">Stuff</td> > <td align="center">Stuff</td> > </tr> > <tr > id="newUsers"> > <td>New Test User</td> > <td align="center">Stuff</td> > <td align="center">Stuff</td> > <td align="center">Stuff</td> > </tr> > <tr > id="oldUsers"> > <td>New Test User</td> > <td align="center">Stuff</td> > <td align="center">Stuff</td> > <td align="center">Stuff</td> > </tr> > </tbody> > <!-- Rinse and repeat about 490 more times --> > > </table> > > > Any ideas as to why this would be killing FireFox? Is it just the way > FF handles processing the display/hide of so many table rows? > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328332 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4