Fix getColor() in wp-lists.js

git-svn-id: https://develop.svn.wordpress.org/trunk@17780 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2011-04-30 16:57:20 +00:00
parent dc7228f7b0
commit b9874e63dc
3 changed files with 4 additions and 11 deletions
+2 -9
View File
@@ -242,16 +242,9 @@ wpList = {
return false;
},
// From jquery.color.js: jQuery Color Animation by John Resig
getColor: function( el ) {
if ( el.constructor == Object )
el = el.get(0);
var elem = el, color, rgbaTrans = new RegExp( "rgba\\(\\s*0,\\s*0,\\s*0,\\s*0\\s*\\)", "i" );
do {
color = jQuery.curCSS(elem, 'backgroundColor');
if ( color != '' && color != 'transparent' && !color.match(rgbaTrans) || jQuery.nodeName(elem, "body") )
break;
} while ( elem = elem.parentNode );
var color = jQuery(el).css('backgroundColor');
return color || '#ffffff';
},