2 Replies Latest reply on Sep 4, 2013 7:21 PM by ColbyFulton

    Animating filters for rollovers

    ColbyFulton Level 1

      I'm trying to change the opacity and the saturation of an image when I rollover it. I can make it fade in and out just fine, but I'm having trouble controlling the saturate filter. Anyone done this? It must be possible! I know I can do it with a couple of layers, one gray and one color, then making the top one fade in and out, but I'd rather solve this in code.


      Here's what I have so far:


      In the actions window of my graphic, in the mouseout section:


      sym.$("half_barista").animate({ "opacity" : "0.5" , "filter" : "saturate(0.0)"}, 500);


      In the mouseover:


      sym.$("half_barista").animate({ "opacity" : "1.0" , "filter" : "saturate(1.0)"}, 500);


      But only the opacity is working. Thanks!