I have a div that I want to apply CSS transform scale property with a dynamic value based on the parent div's scroll position.
So say I have a div with an id called #circle that has a parent div called #main. I want to find the #main div's height and divide it by 100 to create a dynamic value. Using this dynamic value, I want to animate the #circle div on scroll event. So when the user is at the top of the #main div, the #circle is scaled at zero per cent, and when the user scrolls to the bottom of the main div, the circle has a scaling value of 100%.
Here is a jsFiddle.