Compatibility:
SharePoint 2013 Foundation (SPF) and Server (SPS) SharePoint 2010 Foundation (SPF) and Server (SPS) Windows SharePoint Services (WSS) 3.0 / Microsoft Office SharePoint Server (MOSS) 2007
SPF & SPS 2013 • 2010 • 2007
User Voices
(Loading...)

SharePoint Add-Ons Forum > Re: jQuery Color Animations: Adding RGBA alpha channel�support - SharePoint Zen

Hi there -- this is in response to jQuery Color Animations: Adding RGBA alpha channel�support - SharePoint Zen:

Maybe this could help you

jQuery.rgba = (function()
{
var
p = document.createElement('p'),
r = false ;
try { p.style.color = 'rgba(1,1,1,0.5)' ; r = /^rgba/.test(p.style.color); } catch(e) { };
p = null;
return r ;
})();

// OR this extended function

jQuery.color.support =
(function()
{
var
p = document.createElement('p'),
s = { rgb:false, rgba:false, hsl:false, hsla:false };
try { p.style.color = 'rgb(1,1,1)' ; s.rgb = /^rgb/.test(p.style.color); } catch(e) { };
try { p.style.color = 'rgba(1,1,1,0.5)' ; s.rgba = /^rgba/.test(p.style.color); } catch(e) { };
try { p.style.color = 'hsl(1,1,1)' ; s.hsl = /^hsl/.test(p.style.color); } catch(e) { };
try { p.style.color = 'hsla(1,1,1,0.5)' ; s.hsla = /^hsla/.test(p.style.color); } catch(e) { };
s.alpha = ( s.rgba || s.hsla ) ? true : false ;
p = null;
return s ;
})()

October 22, 2009 at 16:46 | Unregistered CommenterXavier