I would like a home page that allows the user to scroll and automatically feed down to the next part without being stuck between the middle of two visuals/home pages.
Please take a look at the pintrest link and scroll to get where I am coming from (this is hard to put into words)
I have never done that but I see what you are talking about. I would imagine they have an event listener to detect when a scroll occurs on the page. At that time they probably use the preventDefault() method so they control the movement on the screen and use an animation to âscrollâ from one section to the next. I think it would be pretty easy to do in bubble. You can use javascript on the page and possibly even the built in âanimate elementâ actions or the âscroll toâ action to handle the movements. Also create a custom state on the page to track which group or section is currently showing with the correct default value. Maybe add a 1X1 px group or just give two elements that can be used in a Bubble âElement is clickedâ workflow ID attributes like âmovedupâ and âmoveddownâ. Then in those workflows you can say when Group Movedup is clicked âScroll To `The Element Aboveââ and vice versa for when Group Moveddown is clicked.
On the Page is Loaded workflow you can use the Toolbox plugin âRun Javascriptâ action
let previousScrollPosition = window.scrollY;
window.addEventListener('scroll', function(event) {
// get current scroll position
const currentScrollPosition = window.scrollY;
// compare current and previous scroll positions to determine scroll direction
if (currentScrollPosition > previousScrollPosition) {
if($('#movedup').length){
$('#movedup').click()
}
} else {
if($('#moveddown').length){
$('#moveddown').click()
}
}
// update previous scroll position
previousScrollPosition = currentScrollPosition;
});