Hi,
This function works in Firefox, Chrome, IE9. Doesn't work in Opera.
function isValidHex(hex) { alert(hex);
var strPattern = /^#([0-9a-f]{1,2}){3}$/i; alert(strPattern.test(hex));
return strPattern.test(hex);
}
The hex going in is the same. The result of strPatter.test returns false in Opera and true in Firefox.
Tested.
#000000
#ffffff
Any ideas?