[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-09 Thread Renato Formato
fambizzari ha scritto: Ok... here we go... I got it to work with this... $(table tbody) .mouseover(function(e) { $(e.target).parents('tr').addClass('over'); }) .mouseout(function(e) {

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-08 Thread Renato Formato
fambizzari ha scritto: George, I have no idea what you are talking about! Can you explain by means of code? I posted an example in the first answer to your question :) Didn't you read it? Ciao Renato

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-08 Thread fambizzari
@Renato - Thanks for the example. But i didn't see it and i still can't see it. @Suni - I've never used bind (except in a copy/paster job). Can you point me to a tutorial which explains it. Thanks

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-08 Thread fambizzari
Thanks Renato, i didn't realise you were talking about that. On Nov 8, 8:58 pm, Renato Formato [EMAIL PROTECTED] wrote: fambizzari ha scritto: @Renato - Thanks for the example. But i didn't see it and i still can't see it. Try

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-08 Thread fambizzari
Renato, THat doesn't seem to work over here: $(table tbody) .mouseover(function(e) { if(e.target).is(tr) $(e.target).addClass(over); }) .mouseout(function(e) { if(e.target).is(tr) $(e.target).removeClass(over);

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-08 Thread fambizzari
I got it to work with this though: $(table tbody) .mouseover(function(e) { if((e.target)==tr) $(e.target).addClass(over); }) .mouseout(function(e) { if((e.target)==tr) $(e.target).removeClass(over); }); Is

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-08 Thread fambizzari
Ok the code does not throw any errors, but it doesn't do what its supposed to do. Aren't we suppose to check what the parent of the target is? Because, in effect, it is a table cell which is being hovered over and not the row. Any ideas?

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-08 Thread fambizzari
Ok... here we go... I got it to work with this... $(table tbody) .mouseover(function(e) { $(e.target).parents('tr').addClass('over'); }) .mouseout(function(e) { $(e.target).parents('tr').removeClass('over');

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-07 Thread George
One final thought, can you deligate mouseover and mouseout events to a parent element such as the table, then inside your event handler function, read the event.target to decide which row or cell or whatever is being hovered-over? George On Nov 7, 5:38 am, fambizzari [EMAIL PROTECTED] wrote:

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-07 Thread fambizzari
George, I have no idea what you are talking about! Can you explain by means of code?

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-07 Thread Suni
basically just bind the event handlers to the parent, such as the tbody or table, check the event.target and act: $('#myTable tbody').bind('click', function(e) { });

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-06 Thread Renato Formato
[EMAIL PROTECTED] ha scritto: The following code works fine on small tables: $(table tbody tr).mouseover(function(){$(this).addClass(over);}).mouseout(function(){$(this).removeClass(over);}); But on tables with 5,000-10,000 rows, it throws the A script on this page may be busy, or it

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-06 Thread fambizzari
The solution i adopted was CSS (tr:hover) for non-IE6 and only allow small tables to have hover-over using a class name to identify them. Any better solutions? On Nov 6, 10:45 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: The following code works fine on small tables: $(table tbody

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-06 Thread Jeffrey Kretz
-Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of fambizzari Sent: Tuesday, November 06, 2007 2:29 AM To: jQuery (English) Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables The solution i adopted was CSS (tr:hover) for non-IE6

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-06 Thread Andy Matthews
-Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeffrey Kretz Sent: Tuesday, November 06, 2007 9:21 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables Personally, I would recommend looking

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-06 Thread fambizzari
Of Jeffrey Kretz Sent: Tuesday, November 06, 2007 9:21 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables Personally, I would recommend looking at a paging solution, rather than trying to deal with so many rows on a single HTML page. I

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-06 Thread Josh Nathanson
Why not try paging on scroll, similar to Google Reader? I think there was a plugin for just that a while ago. I'm just not a big fan of that technique from a usability standpoint. Regular non-techie people are not used to unexpected things happening when they scroll. If someone wants to

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-06 Thread Jake McGraw
to paging. -- Josh - Original Message - From: Karl Swedberg To: jquery-en@googlegroups.com Sent: Tuesday, November 06, 2007 1:55 PM Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables You could add onmouseover and onmouseout directly to the trs. It's

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-06 Thread Karl Swedberg
Kretz Sent: Tuesday, November 06, 2007 9:21 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: PROBLEM: Adding hover to table rows on large tables Personally, I would recommend looking at a paging solution, rather than trying to deal with so many rows on a single HTML page. I tested

[jQuery] Re: PROBLEM: Adding hover to table rows on large tables

2007-11-06 Thread fambizzari
In the end, we've gone for pagination on the most commonly used application and a warning on the least used application recommending users to keep their lists short.