[jQuery] Re: Hover Effect on 2 rows

2009-01-29 Thread jQuery Lover
Hi Kevin, I have not checked the code since I just wrote and submitted it. However I don't see any cross browser problems in this script. You could try to add semicolons where I've missed previously and move the function declaration before the jquery script like this: function getNeighbor(el, cl

[jQuery] Re: Hover Effect on 2 rows

2009-01-26 Thread kevind
Update on this project i've opted to roll up to 1 row as end users of this private app. have more screen space horizontally that i can work with. however, the script below doesn't appear to work in Firefox - it works fine in IE 6, Chrome what's up with that ? my on-page style is tr.hover td

[jQuery] Re: Hover Effect on 2 rows

2009-01-26 Thread kevind
thanks - i've opted to roll things up to 1 row anyway - however, i'll keep the link for these 2 row scripts as they seem to work. On Jan 26, 10:04 am, Ricardo Tomasi wrote: > That's quite simple. Just adjust your CSS so that the rows 'blend > together', set cursor: pointer in your CSS, and use t

[jQuery] Re: Hover Effect on 2 rows

2009-01-26 Thread Ricardo Tomasi
That's quite simple. Just adjust your CSS so that the rows 'blend together', set cursor: pointer in your CSS, and use this: $('.Row:even').each(function(){ var t = $(this), link = t.find('a')[0].href; t.add( t.next('.Row') ).click(function(){ window.location = link; }); }); use :od

[jQuery] Re: Hover Effect on 2 rows

2009-01-26 Thread kevind
followup question..now that i have nice hover working, i'd like to set the TR to be a link to a page, instead of the content i have now: == Details == I'd like to get rid of the extra column and the link and make the 2 neighboring rows the link with the browser showing a '

[jQuery] Re: Hover Effect on 2 rows

2009-01-26 Thread kevind
This one did the trick - thanks ! On Jan 26, 5:29 am, jQuery Lover wrote: > Hi Kevin, > > NO, you can not wrap your tr's with div's or span's. > > Unfortunately Olaf's script will not work also. > > A little ugly script should do the job: > > $(function(){ >         $('.Row').hover(function(){ >

[jQuery] Re: Hover Effect on 2 rows

2009-01-26 Thread Ricardo Tomasi
oops. posted my testing code. here's the right one: $('.Row').each(function(){ var t = $(this), n = t.next('.Row'), direction = n.length ? 'next' : 'prev'; t.hover(function(){ t[direction]('.Row').andSelf().addClass('hover'); },function(){ t[direction]('.Row').andSelf().remov

[jQuery] Re: Hover Effect on 2 rows

2009-01-26 Thread Ricardo Tomasi
There is a simpler way: $('.Row').each(function(){ var t = $(this), n = t.next('.Row'), direction = n.length ? 'next' : 'prev'; $(this).hover(function(){ t[direction]('.Row').andSelf().children('td').css ('background','red'); },function(){ t[direction]('.Row').andSelf().children(

[jQuery] Re: Hover Effect on 2 rows

2009-01-26 Thread jQuery Lover
Hi Kevin, NO, you can not wrap your tr's with div's or span's. Unfortunately Olaf's script will not work also. A little ugly script should do the job: $(function(){ $('.Row').hover(function(){ $(this).addClass('hover'); getNeighbor(this, 'Row').addClass(

[jQuery] Re: Hover Effect on 2 rows

2009-01-26 Thread Olaf Bosch
kevind schrieb: how do get the 2 TR's to highlight together at the same time when i float over the class 'Row' ? Do i surround them with DIVs or SPAN? Is this possible to group 2 table rows inside another element and get the function to fire for both. Give this a try: $(function(){ $('.Ro