Skip to content
Advertisement

How can I make the the google chart animation start only when it comes into view when scrolled?

Hi I want to know how can I make the google chart animation only start when scrolled and when it comes into view.

JavaScript

Advertisement

Answer

You can add a listener on scroll and only load google chart on condition (“when the user scroll pass #chart_div”) :

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement