Okay
  Public Ticket #2710082
Go to deeplink after slide reloads.
Closed

Comments

  • Bill Mitchell started the conversation

    Hi,

    I'd like to navigate the a deeplink after a slide reloads.  How do I do that?

    My deeplink is "bms" and I want to navigate to #bms on another slider after the active slide loads.

    Thanks!

    Bill

  • Bill Mitchell replied

    I pay for tech support here.  Do you intend to address my question?

  •  244
    Kreatura Support replied

    Hello Bill,

    If you would like to change someting in a slider for an interaction in an other slider, then you should use the LayerSlider API: https://layerslider.kreaturamedia.com/documentation/#layerslider-api

    In this example, if you navigate to the second slide in that slider, it will be changed the hash to "test" in the URL. If the 'test' deeplink is set in another slider, that slider will switch to it.
    slideChangeDidComplete function:

    function( event, slider ) {
        if( slider.slides.current.index === 2 ) {
         document.location.hash = 'test';
        }
    }
    

    Best Regards,
    Andrea | Kreatura Support Team

  • Bill Mitchell replied

    That works, however, I want to look up the deeplink in the secondary slider any time the active slider is reloaded or changes slides, not just a to particular slide.

  • Bill Mitchell replied

    Well, that was working.  Now it no longer does.  Strange.

  •  244
    Kreatura Support replied

    Hello Bill,

    In this case, you should try to write a javascript function to the sliderDidLoad function (it triggers when the slider loaded) and remove the if statement from the slideChangeDidComplete function.

    Best Regards,
    Andrea | Kreatura Support Team

  • Bill Mitchell replied

    I thought that would work too but it seems to do nothing.  If I put the code in sliderwillload, it works beautifully.  Unfortunately the href # anchor then doesnt work.

    document.location.hash = 'test'