Re: [Proto-Scripty] highlighting a tablerow

2013-01-03 Thread Phil Petree
Walter, I tried your method of applying the class to the td's and your code was throwing an error which is most likely my fault. It's saying that "object doesn't support that method" on the elm.addClassName('over'); PROTOTYPE: var rows = $$('#mail tr'); $('mail').on('mouseover', 'tr', function

Re: [Proto-Scripty] highlighting a tablerow

2013-01-03 Thread Walter Lee Davis
On Jan 3, 2013, at 8:59 AM, Phil Petree wrote: > $('mail').on('mouseover', 'tr', function(elm, evt){ My error, the variables are swapped. Make that line this: $('mail').on('mouseover', 'tr', function(evt, elm){ Walter -- You received this message because you are subscribed to the Google Grou

Re: [Proto-Scripty] highlighting a tablerow

2013-01-03 Thread Phil Petree
Thanks Walter! I tried quite a few things... borrowed 1/2 dozen snippets from various places and nothing was working till yours. I still have one question, how do you undo (stopObserving) these events? When I load new tables into the other tabs via ajax they are not being monitored which means I

Re: [Proto-Scripty] highlighting a tablerow

2013-01-03 Thread Walter Lee Davis
On Jan 3, 2013, at 1:41 PM, Phil Petree wrote: > Thanks Walter! I tried quite a few things... borrowed 1/2 dozen snippets > from various places and nothing was working till yours. > > I still have one question, how do you undo (stopObserving) these events? > When I load new tables into the

Re: [Proto-Scripty] highlighting a tablerow

2013-01-03 Thread Phil Petree
OK, I could do that but I wouldn't want it over every tr, only those within the mail table. For instance if you were in an alternate tab viewing an email, you wouldn't want a mouseover on the to, from, subject or message rows. Likewise in the compose tab. On Jan 3, 2013 2:27 PM, "Walter Lee Davis

Re: [Proto-Scripty] highlighting a tablerow

2013-01-03 Thread Walter Lee Davis
You can be as specific as you want. If you need to highlight only the tables that have a particular ancestor, you could make the selector something like document.on('mouseover', 'table.stripe tr', ... and then you would only capture the tables that you had deliberately marked as being

Re: [Proto-Scripty] highlighting a tablerow

2013-01-03 Thread Phil Petree
You were bang on about going up the heirarchy... instead of the top of the dom, I went to the tabs div and then it was working fine. I was able to just include the rows in mail... mail system is 99% functional... will have to add in a contact list type system but will do that later. Thanks for a