question for jquery experts here

2010-12-17 Thread fun and learning

hi All -

I am using the following jquery script to hover and click on table rows:

$(.simplehighlight).click(function() {
$(this).children().addClass('clicked');

$(this).siblings().children().removeClass('clicked');
});

$(.simplehighlight).hover(function() {
$(this).children().css('backgroundColor', '#ffdc87');
}, function() {
$(this).children().css('backgroundColor', '');
});

'simplehighlight' is the class name of a tr. The script works fine in 
Firefox, but the problem comes with IE8. I have around 20 to 25 columns, and 
For hover, it takes some milliseconds to catch up with the cursor, and with 
click, it takes around two seconds. Any suggestions on this?

I am asking this question in this forum, because lot of Coldfusion developers 
use jquery. So trying my luck here too.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340112
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: question for jquery experts here

2010-12-17 Thread Rick Faircloth

Send some of your table over, so I can set up a test...

Rick

-Original Message-
From: fun and learning [mailto:funandlrnn...@gmail.com] 
Sent: Friday, December 17, 2010 3:00 PM
To: cf-talk
Subject: question for jquery experts here


hi All -

I am using the following jquery script to hover and click on table rows:

$(.simplehighlight).click(function() {
$(this).children().addClass('clicked');

$(this).siblings().children().removeClass('clicked');
});

$(.simplehighlight).hover(function() {
$(this).children().css('backgroundColor', '#ffdc87');
}, function() {
$(this).children().css('backgroundColor', '');
});

'simplehighlight' is the class name of a tr. The script works fine in
Firefox, but the problem comes with IE8. I have around 20 to 25 columns, and
For hover, it takes some milliseconds to catch up with the cursor, and with
click, it takes around two seconds. Any suggestions on this?

I am asking this question in this forum, because lot of Coldfusion
developers use jquery. So trying my luck here too.




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340123
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: question for jquery experts here

2010-12-17 Thread Lists

Without seeing your code I'd wager that the problem is you're assigning too 
many event handlers with your selector. Rather than putting a class on every 
row of a table, put an I'd on the table and use this instead.

$('#myTable tr')

I'll bet that you'll get better performance. 


On Dec 17, 2010, at 1:59 PM, fun and learning funandlrnn...@gmail.com wrote:

 
 hi All -
 
 I am using the following jquery script to hover and click on table rows:
 
 $(.simplehighlight).click(function() {
$(this).children().addClass('clicked');
 
$(this).siblings().children().removeClass('clicked');
 });
 
 $(.simplehighlight).hover(function() {
$(this).children().css('backgroundColor', '#ffdc87');
 }, function() {
$(this).children().css('backgroundColor', '');
 });
 
 'simplehighlight' is the class name of a tr. The script works fine in 
 Firefox, but the problem comes with IE8. I have around 20 to 25 columns, and 
 For hover, it takes some milliseconds to catch up with the cursor, and with 
 click, it takes around two seconds. Any suggestions on this?
 
 I am asking this question in this forum, because lot of Coldfusion developers 
 use jquery. So trying my luck here too.
 
 
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340125
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm