Deep linking and events firing on certain slides

Ed created the topic: Deep linking and events firing on certain slides

Hi

I would like to fire some events when the slider reaches a certain slide.
For example, I would like to start some music from slide 7 to 13 with some code external to the slider itself.
Can you please point me out on how to proceed here?
Thanks

#53621

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Deep linking and events firing on certain slides

Dear Ed,

Looks like what you need to achieve can be done using Slider Callbacks option from your slider settings. Could you please try this and let me know if it works?

Thank you!


Kind regards,
Agapi G.
Web-Dorado team
#53665

Please Log in or Create an account to join the conversation.


Ed replied the topic: Deep linking and events firing on certain slides

Where can I find some documentation about how to use them?

#53679

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Deep linking and events firing on certain slides

Dear Ed,

Unfortunately the documentation is not ready yet, since callback settings are going to be change a little bit soon.

However, you will need to write a few lines of Javascript code by adding a callback type from Add new callback dropdown option.

Thank you!


Kind regards,
Agapi G.
Web-Dorado team
#53761

Please Log in or Create an account to join the conversation.


Ed replied the topic: Deep linking and events firing on certain slides

hi

this is not clear. putting some test code disrupts the slider.
for example
<script>
alert('Hello, World!')
</script>
is giving a series of errors on the page and preventing the slider's loading.
Also the settings are general (ex. "on slider init") and not page specific (aka deep linking).

Could you be more clear on this?
thanks

#53829

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Deep linking and events firing on certain slides

Dear Ed,

Please remove the <script> tag, since the code is automatically placed in it on frontend. And the double <script> tag is also the cause of these errors.

All will be working properly, in case you remove the tags, but please make sure to keep me posted, if there will be any kind of further problems.

Thank you!


Kind regards,
Agapi G.
Web-Dorado team
#53909

Please Log in or Create an account to join the conversation.


Ed replied the topic: Deep linking and events firing on certain slides

hi

now it is working properly.

I need to know how to hook an event on a certain slide though.
Can you send me the code to set a behaviour on a certain slide?
For example, reaching slide n5 I need to fire a buy event to the read the rest of the slides.
Im taking care of that part of the code, I just need to add a custom callback.

thanks

#54333
Attachments:

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Deep linking and events firing on certain slides

Dear Ed,

Here's how you can manage to achieve this functionality. There is no need to create a custom callback, but instead you can use Slide change start callback and write an if statement as follows:

if (key == 4) {
}

And your Javascript code goes inside that if statement. This will be the case of 5th slide.
Thank you!


Kind regards,
Agapi G.
Web-Dorado team
#54549

Please Log in or Create an account to join the conversation.


Ed replied the topic: Deep linking and events firing on certain slides

thank you this is nearly working.

Still need a bit of help here.

Im trying to change the language of the slider with a button --> comiclang-rus, etc. that sets the custom_class of the layer with the language as visible or not.

jQuery(document).ready( function ($j) {
        var comicLang = "rus";
        localStorage.setItem("comicLang", comicLang);
    $j(".comiclang-rus").click(function(){
        $j(".wds_animated.txt-russian").css('cssText', $j('.wds_animated.txt-russian').css('cssText')+'opacity: 1 !important');
        $j(".wds_animated.txt-english").css('cssText', $j('.wds_animated.txt-english').css('cssText')+'opacity: 0 !important');
    });
});
and so on for the other languages buttons.

then this is placed on a slider callback.
var comicLang = localStorage.getItem("comicLang");
        if (comicLang == "rus"){
            $j(".wds_animated.txt-russian").css('cssText', $j('.wds_animated.txt-russian').css('cssText')+'opacity: 1 !important');
and so on...
the problem is that turning the slides, the slider outputs the "previuos" language before updating it with the new one (laps a sec or so).

I tried also to remove the class and add it back, but I can't reach the image class, only the id.
(ie. $( "#wds_0_slide1_layer65" ).remove(); works, while $("img.myclass").remove; doesn't)-

I see there is also an option to flag the layers as published or not. Is it possible to change this flag dynamically?

thanks

#55403

Please Log in or Create an account to join the conversation.


Agapi G. replied the topic: Deep linking and events firing on certain slides

Dear Ed,

Thank you for the code! Our developers looked, but they are kindly asking you to give us the link to your slider page. This way they will check the Javascript code and suggest you a solution to the problem.

So could you please give the link to your slider page?
Thanks in advance!


Kind regards,
Agapi G.
Web-Dorado team
#55505

Please Log in or Create an account to join the conversation.


Time to create page: 0.232 seconds
Powered by Kunena Forum

WORLD-CLASS SUPPORT

We are here for you every step of the way. Turn to our support with any questions you might have about our products and services. Our experienced customer care team is available to help you as fast as we possibly can.

Contact us