Ah, this issue bit me in the ass, using jQuery 1.2.3... is this a
browser/css quirk or is there a planned fix?

- jake

On Jun 17, 2007 7:31 AM, Fil <[EMAIL PROTECTED]> wrote:
>
> > I'am not sure, but this one may be faster:
> >
> > // get the background color
> > var current_p = $(this);
> > var bg = "transparent";
> > while(bg == "transparent") {
> >         bg = current_p.parent().css('background-color');
> >         current_p = current_p.parent();
> > }
>
> you have a parent() too many ;-)
>
> anyway this will fail if everything is transparent: you'll hit the
> document as $('html').parent() and get a js error when doing .css() on
> it.
>
> -- Fil
>

Reply via email to