GianlucaGuarini / jQuery.BlackAndWhite

Clientside grayscale images on any browser
http://gianlucaguarini.github.io/jQuery.BlackAndWhite/
Other
310 stars 131 forks source link

image pre-loading with google font or font-face #46

Closed martinodehnal closed 10 years ago

martinodehnal commented 10 years ago

Hello, thank you for your plugin!

I try your plugin with google fonts, but image preloading don't work: http://test.mo.cz/test-bw/ Please where is the problem? When I delete font-family the plugin works ecellent.

Thank you, thank you, thank you

GianlucaGuarini commented 10 years ago

That's your error, it cannot find the webworker javascript file: screen shot 2014-04-15 at 19 42 29

Replace your code with this:

$('.foto-cb').BlackAndWhite({
    hoverEffect:true,
    onImageReady:function(img){
      $(img).parent().animate({
        opacity:1
      });
    }
});
martinodehnal commented 10 years ago

Thank you for the quick reply. I updated page, and when refresh, you will see color image and after that black and white. Please, I need one more help. Thank you, thank you.

GianlucaGuarini commented 10 years ago

In you css

.foto-cb {
  opacity:0;
  filter:alpha(opacity=0); /* For IE8 and earlier */
}
martinodehnal commented 10 years ago

fantastic, brilliant, thank you! when you come to prague, I will buy you beers :)