Hello,
I am trying to clink to a specific slide, the button to press is on a different page. I have gone through past discussions but can't find a solution for this specifically.
I feel like the following code is what I need (in part) but I am still learning it all and can't piece it together to do what I want it to.
$w("#button36").onClick((event) => { $w("#slideshow1").next(); })
$w("#slideshow1").changeSlide(1);
Any help would be greatly appreciated, thanks.
Legendary! Thank you so much for your help today. I will be diving more in to the tutorials and getting a better head for Corvid.
Thanks Yisrael!!
Instead of this:
wixLocation.to("/projects");
use this:
wixLocation.to("/projects#slideshow1");
Yay thank you! It works! I just need to get it to take me to the part of the page that displays the slideshow as it currently just takes me to the projects page and the right slide but not directly to the part of the page where the slide is.
I don't know if this would even be possible as I couldn't link to anchors like this before?
Sorry and thank you!
Button page:
import wixLocation from 'wix-location'; import { local } from 'wix-storage'; $w.onReady(function () { $w("#button25").onClick((event) => { console.log('click'); local.setItem("slide-number", "1"); wixLocation.to("/projects"); }) });
Slideshow page:
import {local} from 'wix-storage'; $w.onReady(function () { let num = Number(local.getItem("slide-number")); $w("#slideshow1").changeSlide(num); });
Thank you, and thanks for the links I have been getting through some of the tutorials - way more to go as you can probably tell!
I put in the code and have no errors, which is great but nothing happens when I press the button.
Button page code:
import wixLocation from 'wix-location'; import {local} from 'wix-storage'; // ... let value = local.getItem("#slideshow1"); // $w("#button25").onClick((event)=>{ local.setItem("slide-number", "1"); wixLocation.to("/projects"); })
Slideshow page code:
import {local} from 'wix-storage'; // ... local.setItem("#slideshow1"); $w.onReady(function () { let num = local.getItem("slide-number"); $w("#slideshow1").changeSlide(num); });
I don't know if it will help but this is the web page that I want the button to work from https://gtd-websites.wixsite.com/hjcollection/developments-map and for it to connect to the relevant slide show at the bottom of this page https://gtd-websites.wixsite.com/hjcollection/projects
Thanks again!
On the button page you need to save the slide number to be displayed, and then redirect to the slide page using the wix-location API:
$w("#button25").onClick((event)=>{ local.setItem("slide-number", "1"); wixLocation.to('/SlidePage'); })
On the slide page you need something like this:
$w.onReady(function () { let num = local.getItem("slide-number"); $w("#slideshow1").changeSlide(num); });
To learn about programming with Corvid, read the following articles that will help you start working with Corvid:
About Corvid by Wix - what Corvid is and what features it has.
Getting Started with Corvid by Wix - step-by-step tutorial on how to start using Corvid.
Onboarding to Corvid by Wix - introduction to Corvid with short tutorials.
Hi, slide show usually comes with two buttons, "previousButton" and "nextButton". Here is what actually needed:
$w("#previousButton").onClick((event)=>{
$w("#slideshow1").previous();
})
$w("#nextButton").onClick((event)=>{
$w("#slideshow1").next();
})