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

What is Framer? Join the Community
Return to index
Dave Marchuk
Posted Jan 10 - Read on Facebook

Hi Everyone,

Thanks for accepting my join request!

My JS is pretty rough and I have a problem I can't figure out:

I have an element (smallBox) as a group within a larger element in my Photoshop file (bigBox). If I'm understanding right, the parent (bigBox) is assigned as the "superView" of the child "view" (smallBox) when Framer generates.

I have figured out the scripting so that when you click anywhere on "bigBox", it slides up (mostly off screen), which is what I need.

However, this is causing me problems: I don't want the "bigBox" to slide up when "smallBox" is clicked; clicking on "smallBox" needs to change the main background image and leave "bigBox" open.

Does anyone have any advice on how to get this working or is my approach not going to work?

7 Comments

Will Moyer

I'd have them be separate (non-hierarchical) views, with smallBox on a higher layer. When bigBox is clicked, you'll have to animated both smallBox and bigBox to slide up.

Dave Marchuk

That was my suspicion... was hoping I could separate the child from the parent for this action... thanks for the advice!

Will Moyer

Yeah AFAIK since smallBox is a subview of bigBox, clicking it will trigger bigBox's animation.

Will Moyer

You could do this. Make each one a group nested under a bigger group that you animate.

- stuffThatSlidesUp
-- smallBox
-- bigBox

And make bigBox trigger an animation on stuffThatSlidesUp.

Dave Marchuk

Ah... yes that will work... that sounds like the easiest solution, so that I'm not adding extra code... Thanks!

Craig Murray

Will Moyer 's advice in regards to seperate non hierarchial views is best for this in my experience.

Dave Marchuk

Yeah, I've separated the elements out and it's working really well. A little more code, but the effect is pretty sweet!

Read the entire post on Facebook