Sweet. I like more simple (even though I tend to find the more
complicated route). :)

and ... yeah I accidentally removed the check from elem.currentStyle
while I was trying other things. :(  Thanks for pointing it out.

--
Brandon Aaron


On Thu, May 14, 2009 at 12:55 PM, Matt Kruse <[email protected]> wrote:
>
> On May 14, 9:55 am, Brandon Aaron <[email protected]> wrote:
>> Fixed in r6439 (http://dev.jquery.com/changeset/6349).
>
> This seems simpler:
>
> var ret="";
> if ( !jQuery.support.opacity && name=="opacity" && elem.currentStyle )
> {
>  if ((elem.currentStyle.filter||'').match(/opacity=(\d+)/)) {
>    ret = (parseFloat(RegExp.$1)/100)+'';
>  }
> }
>
> since currentStyle will reflect the value being set inline or via a
> css rule. Also, it's necessary to verify that currentStyle exists,
> since it can't be assumed just because the jQuery.support.opacity
> check failed (inferring its existence is just as bad as browser
> detection).
>
> (btw, I tested the above code on a sample case, but not against the
> test suite)
>
> Matt Kruse
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to