renzetc
(Renze)
July 29, 2020, 7:57am
1
Hi guys,
Asked before but no luck then - I tried linking a button to a specific slide by adding some custom code (which I grabbed from older topics here) but it won’t work. I assume it’s the code itself that’s not right but can’t find the issue (basically because I don’t understand much of it)
Would be awesome if anyone could help me out!
Here’s the read-only:
https://preview.webflow.com/preview/svenwithofs?utm_medium=preview_link&utm_source=designer&utm_content=svenwithofs&preview=e78aa3c4b013c7bf4bf5fbe13da431b4&mode=preview
And published:
http://www.svenwithofs.webflow.io/
Thanks in advance!
Here is my site Read-Only: LINK
(how to share your site Read-Only link )
renzetc
(Renze)
July 29, 2020, 2:08pm
2
Could anyone help me out? Please?
magicmark
(Mark Willis)
July 30, 2020, 10:50am
3
Hey @renzetc ,
I can’t promise I can fix anything, but if you can add some kind of steps as to what you are trying to do, or a link to a working example, then it can be helpful for anyone coming along to know what it is you’re actually trying to do.
e.g
Click the button called button-name
I want it to do xyz
action
Click a second time, I want to it do abc
action
Once we know what you’re trying to do, we can help you debug, write some new code, or even offer a solution within Webflow itself.
Hope that helps.
renzetc
(Renze)
July 30, 2020, 11:00am
4
Thanks @magicmark for the clarification. Sorry if my question wasn’t clear.
I’m trying to link each of the buttons on the left (Groeistrategie, Fusie & Overname and Analyse) to the according slides. So:
Linkblock ‘GroeistrategieLink’ should activate slide ‘GroeistrategieSlide’
Linkblock ‘FusieOvernameLink’ should activate slide ‘FusieOvernameSlide’
Linkblock ‘AnalyseLink’ should activate slide ‘AnalyseSlide’
I looked for similar articles and found some code, which I tried to embed in the body as follows:
<script>
$(document).ready(function() {
$('#Groeistrategieslide').click(function(e) {
e.preventDefault();
$('.GroeistrategieLink').removeClass('active');
$(this).addClass('active');
$('.w-round div:nth-child(1)').trigger('tap');
});
$('#FusieOvernameSlide').click(function(e) {
e.preventDefault();
$('.FusieOvernameLink').removeClass('active');
$(this).addClass('active');
$('.w-round div:nth-child(2)').trigger('tap');
});
$('#AnalyseSlide').click(function(e) {
e.preventDefault();
$('.AnalyseLink').removeClass('active');
$(this).addClass('active');
$('.w-round div:nth-child(3)').trigger('tap');
});
});
</script>
Basically this is my version of code someone else used to link buttons to a specific slide.
My question only applies to desktop by the way.
Hope it makes more sense like this!
magicmark
(Mark Willis)
July 30, 2020, 11:39am
5
Are you still wanting to keep the auto-play feature?
renzetc
(Renze)
July 30, 2020, 11:40am
6
Yes, I just want the click to overrule autoplay.
renzetc
(Renze)
August 5, 2020, 8:28am
7
Wondering if you found anything!
renzetc
(Renze)
August 6, 2020, 8:02am
8
Is there a workaround that I don’t know about?
renzetc
(Renze)
August 10, 2020, 12:41pm
9
@magicmark could you let me know if there is or isn’t a solution?