Re: [jQuery] Find first parent element with certain style

2007-03-19 Thread Daemach2
Try doing console.log($(this).css(backgroundColor)) in the second function to see what those background colors are showing up as. Yansky wrote: I'm having a bit of trouble figuring out how to do this. What I'd like to do is find the first parent element that has a background color that is

Re: [jQuery] Find first parent element with certain style

2007-03-19 Thread Luke Lutman
Daemach2 wrote: Try doing console.log($(this).css(backgroundColor)) in the second function to see what those background colors are showing up as. Watch out for Safari, it sometimes returns 'rgba(0,0,0,0)' instead of 'transparent' ... Luke -- zinc Roe Design www.zincroe.com (647) 477-6016

Re: [jQuery] Find first parent element with certain style

2007-03-19 Thread Yansky
Ah excellent - using console.log($(this).css(backgroundColor)) in the second function shows the parent elements background colours as an array: transparent transparent rgb(51, 51, 51) transparent transparent so that means I'm on the right track, I've just stuffed up the if statement. I'll keep

Re: [jQuery] Find first parent element with certain style

2007-03-19 Thread Luke Lutman
Yansky wrote: I'm having a bit of trouble figuring out how to do this. What I'd like to do is find the first parent element that has a background color that is not transparent. This is what I've tried so far, but with no success: $('.elemToFade:first').parents([EMAIL PROTECTED] !=

Re: [jQuery] Find first parent element with certain style

2007-03-19 Thread Yansky
Thanks a bunch, that's very handy code. :) Luke Lutman wrote: Yansky wrote: I'm having a bit of trouble figuring out how to do this. What I'd like to do is find the first parent element that has a background color that is not transparent. This is what I've tried so far, but with no