I have a required of a footer of height more than 500 px. There is contact form on right side which I would like to pin on the page. However, this contact form also scrolls over the footer, which inhibits me from design the footer as i want. Does anyone have a work around how to make the contact form disappear or stop from going over the footer? Thanks
But keep in mind that this workaround make the footer area below the pinned element unclickable.
Otherwise you’ll have to pin the element to a higher position and not to the absolute bottom.
Thanks a lot JD. I do have lot of clickable elements in the footer. I cannot put the element to a higher position because then it moves to a higher position on the header side. Do you think viewportenter can help? So when the footer appears on screen, the contact form hides. But I dont know how to code this.
@info38197 First of all, you can control the position of the pinned element via the editor. It’s not only top or bottom. Try and see.
Second. Yes you can make the pinned element collapse on viewportEnter and expand on viewportLeave.
Inside the $w.onReady() function, use this code:
$w("#footer1").onViewportEnter((event) => {
$w("#contactForm").collapse();//use the form property id
})
$w("#footer1").onViewportLeave((event) => {
$w("#contactForm").expand();
})
Try looking at adding an anchor near to your header and footer and simply have the pinned element hide/collapse or show/expand when the anchor comes into or goes out of the viewport. https://www.wix.com/corvid/reference/$w.Anchor.html
Or as J.D. did on the example given, simply add a transparent box and have the element hide/collapse or show/expand when the header or footer comes into view or goes out of view.
Please add a new post if more help is needed.
Post Closed.