karlhorky/gray

Manual calling does not seem to work.

Bitneko opened this issue · 3 comments

Without assign 'grayscale' class to a image, manually calling the plugin with $('.my-class').gray() does nothing.

Please provide a demo on JSFiddle or something where this fails.

http://jsfiddle.net/8jgy64t9/2/

I expect the line $('.my-image').gray(); to turn the first image to grayscale but that didn't work. Adding the 'grayscale' class is the only way to grayscale the image as demonstrated in the second image.

Ah, I see what you mean. This affects browsers with support for the CSS grayscale properties. In these browsers you need to also apply the properties from the CSS to your new class.

Working demo

I've documented this in bd181a5