This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
John Lee
Posted Jun 06 - Read on Facebook

Hey fellow Framerz!
I'm stuck on something, that is (probably not too difficult) using standard images, but I'd like to use gud ol' svgs, and hipster-functions to intensify the geekiness.
I'm making a simple star-rating proto. The desired behaviour is to click a star and then based on that index, fill the color of all the stars less than that star (that's how a normal rating works!). If I decide on 3 stars, stars 1 + 2 will also get selected. The behaviour should also be reversible (click to select, click again to deselect).
Here's my diarrhoea'd code: http://share.framerjs.com/cvqyred3so1d/
You can sort of see what I'm trying to do, but I don't understand how to pass values between functions from inside loops.
If you just want to pass me off in the right direction for a partial answer, then I'm happy to slave away at my laptop for another infinite period of malnutritional days without sunlight.
Thanks :)

3 Comments

George Kedenburg III
John Lee

By God – that was super quick. George Kedenburg III Thank you so much for this (he says changing his teary icon for a thumbs up). This Framer JS community really does rock! I would definitely buy the t-shirt if there is an official t-shirt?

Jordan Robert Dobson

Get me a video of you doing a nice mute grab and I'll send ya one. ;)

Read the entire post on Facebook