(function() {

// MAXB.NET LABS

})();

firefox, hack, ie, javascript, jquery, plugins

black’n'white 1.0

Posted on by Massimiliano Balestrieri | Comments

…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

DOWNLOAD

/*
 *
 * 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});
});
This entry was posted in firefox, hack, ie, javascript, jquery, plugins and tagged , , , , , , , . Bookmark the permalink.

9 Comments

  1. Posted 17 June 2008 at 18:36 | Permalink

    ahahah uno dei migliori plugin di jquery in assoluto!! :-)

  2. pepijn
    Posted 27 September 2008 at 21:34 | Permalink

    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…

  3. rellok
    Posted 26 October 2008 at 13:52 | Permalink

    This is the most stupid plugin I’ve seen. What for?

  4. Posted 27 October 2008 at 13:03 | Permalink

    @rellok: it’s a joke made just for fun… and because I’m tired to fix IE bugs

  5. Posted 5 November 2008 at 20:32 | Permalink

    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?

  6. Posted 28 January 2009 at 16:00 | Permalink

    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

  7. Posted 28 January 2009 at 16:22 | Permalink

    @Ian

    $ is an alias of jQuery object. :)

  8. Posted 29 January 2009 at 13:53 | Permalink

    haha true. Still, it didnt work for me ’till

    jQuery(”html”).css(”filter”,”gray”);

    was changed to

    $(’body’).css({”filter”:”gray”})

  9. Posted 29 January 2009 at 15:12 | Permalink

    @Ian
    I think that the problem is related to the css
    what counts is that it works

3 Trackbacks

  1. [...] Weitere Infos zum Plugin [...]

  2. [...] 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 [...]

  3. By 10 jQuery Browser Tweakers | jQuery4u on 17 December 2010 at 15:20

    [...] http://maxb.net/blog/2008/06/17/blacknwhite/ [...]