(function() {

// MAXB.NET LABS

})();

firefox, hack, ie, javascript, jquery

ie sucks – black’n’white

Posted on by Massimiliano Balestrieri | Comments

Da un idea di Andy Clarke.

Grazie alla segnalazione di Simone.

Da oggi questo sito verrà visualizzato in bianco e nero da tutti gli utenti che utilizzano ancora internet explorer 6.

Non ho la forza, ne la voglia di spiegare cosa non vada in ie. In ie6 come in ie7… e tra poco in ie8.

Internet explorer dovrebbe sparire. Ma questi sono sogni…

Per chi volesse aderire alla campagna “bianco e nero su ie” può usare un paio di tecniche.

1) SOLUZIONE CSS PURA

Css (anche se un bel if IE senza troppi maggiori/minori….):

<!--[if lt IE 7]>
<link rel=&quot;stylesheet&quot; href=&quot;ie6.css&quot; type=&quot;text/css&quot; media=&quot;all&quot;></link>
 <![endif]-->

e all’interno del css:

html{filter:gray;}

2) SOLUZIONE JS JQUERY

Js – dopo aver incluso la libreria jQuery, in un tag “script” o in un js incluso inserire la seguente funzione

jQuery(document).ready(function(){
    if(jQuery.browser.msie && jQuery.browser.version < 7)
        jQuery("html").css("filter","gray");
});

3) SOLUZIONE JS PURA

window.onload = function(){if(document.all)document.all.tags('html')[0].style.setAttribute('filter','gray()','false')};
This entry was posted in firefox, hack, ie, javascript, jquery and tagged , , , . Bookmark the permalink.