Hello everyone,
It's my first post on your forum. I discovered this library with Scrollmagic and I'm since amazed by its quality. Anyway, here's my problem. I'll try my best to explain but It's quite difficult...
I want to allow my users to change the proportions on a recipe on my page by clicking on an infinite wheel/list... For example :
Let's say the original recipe is meant for 6 people. Above "ingredients for 6 people" (followed by the list of ingredients), I want to display "5 people", and under "7 people". When clicking on "5 people", "5 people" must take the place and css style of "6", "6" the place of "7", "7" must go down and disappear", and a "4 people" must appear where "5" was. Like an infinite wheel where only 3 items are visible at the same time (with different css styles). Of course, it needs to trigger a function which changes the list of ingredients based on the current proportion...
I can't create on every recipe page a pre-generated wheel of proportions values because some recipes are for "1 pie", another for "800 grams of sushi rice", or "30 cookies". The values of the list can't be under 1, and for example, above 12, proportions should increased by 5, above 50 by 10, above 100 by 25, above 500 by 100.
I could drop the idea of this animation, it's simple without. A bit of jQuery to capture the current value and calculate then display the rest. But i really want the list to move...
Could anyone help me please ? I can't figure out how to generate hidden fields on my list each time it moves...
Thank you.