At the moment I have an image that is grayscaled until hover and then it fades into full color. I achieved this effect with this CSS that I found on another post here.
img.grayscale {
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'>
<filter id=\'grayscale\'>
<feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/>
</filter></svg>#grayscale"); /* Firefox 3.5+ */
filter: gray; /* IE6-9 */
-webkit-filter: grayscale(100%); /* Chrome 19+ & Safari 6+ */
}
img.grayscale:hover {
filter: none;
-webkit-filter: grayscale(0%);
}
but now I am hoping to have the image remain grayscale until it comes into view when the user scrolls down on it's section on my one pager website. Then when the user scrolls past the image, it will fade back into grayscale once more.
Basically the exact same effect found on www.hubspot.com's Marketing Platform and Sales Platform section. How would I be able to achieve this effect?
Many thanks for all your help.