…because IE sucks.
This plugin is a tribute to the “Firefox Download Day 2008″.
This plugin helps people moving away from Internet Explorer turning the colors of your website to a grayscaled version (using a property of Explorer itself!).
It was written from an idea of Andy Clarke and a suggest of Simone Parato
/*
*
* Black'n'White plugin 1.0
* $Date: 2008-06-17 15:38:15 +0200 (mar, 17 giu 2008) $
* $Rev: 177 $
* @requires jQuery v1.2.6
*
* Copyright (c) 2008 Massimiliano Balestrieri
* Examples and docs at: http://maxb.net/blog/
* Licensed GPL licenses:
* http://www.gnu.org/licenses/gpl.html
*
*/
if(!window.BlacknWhite)
var BlacknWhite = {};
BlacknWhite = {
init : function(options)
{
options = jQuery.extend({minor : 7}, options);
if(jQuery.browser.msie && jQuery.browser.version < options.minor)
jQuery("html").css("filter","gray");
}
};
jQuery(document).ready(function(){
BlacknWhite.init();
//BlacknWhite.init({minor : 8});
});









{ 9 } Comments
ahahah uno dei migliori plugin di jquery in assoluto!!
hi,
I’m happy and disappointed by your plugin at the same time.
I to was inspired by andy to write a plugin for jQuery to make a site black and white.
I put about 2 days of work into it only to discover someone else made it already.
But i took a quite different approach, i get all color values from elements and calculate their grey color.
This works on any browser, on every element you want, it is invoked like this: $(expr).makeGrey([duration]);
Yes, i made animation possible with this: http://plugins.jquery.com/project/color , it looks great, seeing a site fade to grey slowly…
I use filter for images only…
But guess what… my plugin doesn’t work with IE!!!
Don’t know why, because IE doesn’t have firebug
If i do it on .someclass it works, but with * doesn’t, and i can’t do color names yet.
If you like i can send you my code…
This is the most stupid plugin I’ve seen. What for?
@rellok: it’s a joke made just for fun… and because I’m tired to fix IE bugs
yeah i just made a site and was pissed off to see that it doesn’t work on ie. I want to impliment this code on my site and then have a wee add in the bottom (in color) saying DOWNLOAD FIREFOX!!!!
So how do i make this work on my site? Do i just add that code to the top of my site?
Hey. Fun plugin: I found I couldn’t get it to work for me until I changed:
jQuery(”html”).css(”filter”,”gray”);
to
$(’body’).css({”filter”:”gray”})
and used
$(document).ready(function() {
BlacknWhite.init();
});
instead of
jQuery(document).ready(function(){
BlacknWhite.init();
});
Hope that helps somebody!
twitter.com/id
@Ian
$ is an alias of jQuery object.
haha true. Still, it didnt work for me ’till
jQuery(”html”).css(”filter”,”gray”);
was changed to
$(’body’).css({”filter”:”gray”})
@Ian
I think that the problem is related to the css
what counts is that it works
{ 2 } Trackbacks
[...] Weitere Infos zum Plugin [...]
[...] degli eventi, sia per gli aspetti grafici) in netto conflitto con gli altri (http://maxb.net/blog/2008/06/17/blacknwhite/), facendo sì che il codice necessario alla realizzazione dell’interfaccia, sia visiva che [...]
Post a Comment