Streaming live at 10am (PST)

How can i control gifs animations like on this website

in this website the gifs are starting to paint themselves once the user scroll them into view.
how can i achive this in webflow (the website is from webflow gallery so i guess its posibble. also there are animations happening on hover. please help i need this feature urgently. from what i have seen in the forums its not possible to control gifs directly thru webflow. is there an easy way to do this???

1 Like

Hey @Tal_Shpon :smile:

I’ve done a click to animate before on this page:

To implement a animate on hover, you’ll need to use the script I found on this page, and give your images an ID as well. You’ll need a static version of your gif loaded to the site, then go grab it’s src URL as well as the src URL for the animated GIF and place them accordingly within an HTML embed.

Would need to play around with it to build, but this should get you started on the right track. @bartekkustra may have an easier answer though. :smile:

Here’s the stackoverflow I found.

<img id="imgDino" src="" />

    $(function() {
            function() {
                $(this).attr("src", "animated.gif");
            function() {
                $(this).attr("src", "static.gif");
1 Like

thanks for the answer. do you have any idea how to implement the same thing but with scroll as a trigger?

both hover and scroll a events (methods).

should be able to $("#imgDino").scroll(

$(parent.document).scroll(function() { … });

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.