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
> not transparent.
> 
> This is what I've tried so far, but with no success:
> 
> $('.elemToFade:first').parents("[EMAIL PROTECTED] !=
> 'transparent']:first");
> 
> this also didn't work:
> 
> $('#theDiv').parents().each(function(i){
> if($(this).css("backgroundColor") != "transparent"){
>   return.this[0];}
> });
> 

-- 
View this message in context: 
http://www.nabble.com/Find-first-parent-element-with-certain-style-tf3429157.html#a9559119
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to