I'm having an annoying issue with the css filter invert(); on Firefox 25. This is the code, inserted inside jQuery .ready() context:
$('#colorcontrast').bind('click', function() {
var css = 'html {'+
' filter:invert(100%);' +
' -webkit-filter: invert(100%);' +
' -o-filter:invert(100%);' +
' -ms-filter:"invert(100%)"; }';
if (!window.counter) {
window.counter = 1;
} else {
window.counter ++;
if (window.counter % 2 == 0) {
css = 'html {'+
' -webkit-filter:invert(0%);' +
' -moz-filter:invert(0%);' +
' -o-filter:invert(0%); }';
}
};
console.log(css);
$('#contrast').html(css);
});
It works fine on Chrome and IE9, but not in Firefox 25. When I visited its doc reference page using Firefox, I realized the live demo wasn't working! Does anyone know something about? And could anyone point me other way or solution to apply such filter? Thanks in advance.