ok it seems that livequery is the problem here, I ve read
http://docs.jquery.com/Tutorials:AJAX_and_Events and it seems it will
be the better way, will not?

On 12 Paź, 12:57, kamiseq <[EMAIL PROTECTED]> wrote:
> im loading simple table into my DOM tree, i have about 900 rows and 7
> cols, it shouldnt be that bad. now i used liveguery to bind events to
> 6 objects for each row. I understand that livequery is going through
> the whole 900x6 elements and binds events but then it should be all
> fine.
>
> I dont understand why clicking on some element is taking so long, at
> least 5 second, I have no idea if it is the problem with livequery or
> with jQ or JS is just that slow. I am not really happy with making
> tests how jQ would act if table wasnt loaded with load(). if you have
> any experience I would be glad to hear something about that.
>
> do you know how can I redesign my code to work faster! I dont need to
> mention that with 20 rows everything was fine:D hehe but for Christ's
> sake 900 it is nothing!!
>
> the code is usually something like that:
> $('tr.shortinfo td.access').livequery(function(){
>         $(this).hover(
>             function(){
>                 $(this).css('background-color', '#e6eeee');
>             },
>             function(){
>                 $(this).css('background-color', '#fff');
>             }
>         );
>     }).livequery('click', function(event) {
>         $(this).parent().next().filter('tr.showfullinfo').
>         removeClass('hidden');
>     });
>
> and this is using 100% of CPU for 20sec

Reply via email to