When dealing with tables, event delegation is almost always the best way to
handle it. You might want to give jQuery.listen plugin a try.
http://plugins.jquery.com/project/Listen
--
Brandon Aaron

On Mon, Nov 24, 2008 at 8:36 AM, Carpii <[EMAIL PROTECTED]> wrote:

>
> Hi all, ive just started using jQuery, and also the livequery plugin
>
> I set up jQuery to automatically stripe a table, and also do a
> mouseover to highlight the current row.
> This works nicely, but I wanted to use it inside of a tabset which
> loads its pages dynamically
>
> To do this I started using livequery to bind the events after the tab
> is loaded.
>
> Ive noticed the performance of the row mouseover row highlight is now
> pretty poor, and wondered if Im doing something wrong?
>
> Pretty trivial code....
>
> $(document).ready(function()
> {
>  $(".stripeMe tr")
>        .livequery('mouseover', function() {
>                $(this).addClass("over");
>        })
>        .livequery('mouseout', function() {
>                $(this).removeClass("over");
>        });
> }
>
> Is there a reason this technique would degrade performance ?
>
> Thanks
>

Reply via email to