mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 15:47:05 +00:00
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:
@@ -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';
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user