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?


-- 

Thanks,

Eric Cobb
http://www.cfgears.com


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:328327
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to