Hi again,
you replied directly to me with this:
Awesome! Now 1 more question.
How can I have it not hover the last row too?
Hope you don't mind that I'm posting a response to this question on
the list. I'd like other people to be able to see the answer as well,
just in case someone else might have the same question later on...
Instead of using :gt(0) within the selector expression, you can use
the slice method -- .slice(1,-1)
So it would look like this:
$('tr').slice(1, -1).hover(function() {
// Stuff to do when the mouse enters the row;
}, function() {
// Stuff to do when the mouse leaves the row;
});
Cheers,
--Karl
On Jun 26, 2008, at 12:23 PM, Karl Swedberg wrote:
Hi,
you should be able to do it like so:
$('tr:gt(0)').hover(function() {
// Stuff to do when the mouse enters the row;
}, function() {
// Stuff to do when the mouse leaves the row;
});
--Karl
____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Jun 26, 2008, at 11:27 AM, aldomatic wrote:
I'm having a difficult time figuring out how to add a hover effect on
all but the first table row (tr).
I appreciate anyone's help.
Thanks!