Streaming live at 10am (PST)

Having trouble linking to a specific slide in slider


#1

Hi Guys

here is the url: https://preview.webflow.com/preview/illusivenetworks4081101?preview=c9889d56171fe03de222d3238d176aff

i tried adding the custom jquery code like suggested in the forum but no success.

any ideas what i did wrong?


#2

sorry i forgot to mention that the described slider is in the attacker view page


#4

Hello @Tal_Shpon

The problem that we can't see the custom code through the read-only link so can't really tell if there is the problem inside the code snippet or no.

Could you share code snippet here, please.

Thanks in advance! :slightly_smiling:

Anna


#5

i put:

<script>
$( ".Asection" ).click(function(e) {
  e.preventDefault();
  $( ".attackersliderss .w-slider-dot:nth-child(1)" ).trigger( "click" );
});
$( ".Bsection" ).click(function(e) {
  e.preventDefault();
  $( ".attackersliderss .w-slider-dot:nth-child(2)" ).trigger( "click" );
});
$( ".Csection" ).click(function(e) {
  e.preventDefault();
  $( ".attackersliderss .w-slider-dot:nth-child(3)" ).trigger( "click" );
});
</script>

in the footer code section. .attackersliderss is the class name of the slider. .Csection .Bsection .Asection are the classes of different links.

also i have an embed inside the page with this code:

$( ".asection1)" ).click(function(e) {
  e.preventDefault();
  $( ".w-slider-dot:nth-child(1)" ).trigger( "click" );
});
$( ".bsection(2)" ).click(function(e) {
  e.preventDefault();
  $( ".w-slider-dot:nth-child(2)" ).trigger( "click" );
});
$( ".csection(3)" ).click(function(e) {
  e.preventDefault();
  $( ".w-slider-dot:nth-child(3)" ).trigger( "click" );
});

i know i did something wrong. i am new to this coding thing. please can you help?


#7

I'm not sure where you got your script from, care to share which topic?

Remove both of your previous scripts. Paste this in ONLY the page footer custom code, and NOT the site footer.

<script>
var Webflow = Webflow || [];
Webflow.push(function() {

    var sliderdots = $('.attackersliderss .w-slider-dot');
    $('.asection').click(function() {
        sliderdots.eq(0).trigger('tap');
        return false;
    });
    $('.bsection').click(function() {
        sliderdots.eq(1).trigger('tap');
        return false;
    });
    $('.csection').click(function() {
        sliderdots.eq(2).trigger('tap');
        return false;
    });

});
</script>

#8

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.