Does anyone know if there is a way to make the image appear in grayscale on hover - besides creating two separate images and changing src.
thanks
EDIT - SEMI WORKING CODE ...:
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="scripts/pixastic-1.custom.js"></script> <script type="text/javascript"> $(document).ready(function() { var img = $(".test img") $('.test').hover(function() { $('img', this).pixastic("desaturate"); }, function() { $(this).html(img); }); }); </script>
and
<div class="test" style="padding:25px; width:200px; background-color:#F96"> <img class="pic" src="images/home/mainImage/family_woods.jpg" width="100" height="100" alt="" /> </div>
How can I change this to work if the page has more than one div ... like this ...
<div class="test" style="padding:25px; width:200px; background-color:#F96"> <img class="pic" src="images/home/mainImage/family_woods.jpg" width="100" height="100" alt="" /> </div> <div class="test" style="padding:25px; width:200px; background-color:#F96"> <img class="pic" src="images/home/mainImage/another_image.jpg" width="100" height="100" alt="" /> </div>
source share