I am trying to set a piece of text to slide in from the left side of the screen when it enters the viewport. I’m not an experienced developer. Can anyone lend a rookie a hand?
Here’s what I had. I’m not saying the code makes perfect sense but is was the only combination I got that didn’t give me any errors…
export function SampleText2_viewportEnter($w) {
$w(“#SampleText2”).show(“SlideIn”);
Hi Michael,
I’m assuming that the text you want to show is hidden. If this is the case, it will never get to the viewport event, because it will never be viewed on the screen.
What you should do is to rely on a different object on the screen, and when that object will be viewed, then you can SildeIn the text.
I played around with it again untilI got code that wasn’t flagged as having errors, but it still didn’t work.
export function box2_viewportEnter($w) {
$w(“#SampleText2”).show(“SlideIn”);
}
I think I got it! The problem was that the text was marked as being hidden on load. When I unchecked the box, it was still “hidden”, but did the Slide In animation I wanted it to! Thanks for your help everyone!
I am making a single page website with the help of anchor page. I have added a static element which is common on all the anchor pages but I want to remove that element in few anchors pages. I tried using corvid but it removes that static element from all the pages.
I tried using a single line code " $w(“#myElement”).hide(); ", but it removes the static element from all the pages.
Please provide me with a solution as soon as possible so that I can continue designing my website.