Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Content / Destroy / Reinitialize #170

Open
MountainMaster opened this issue Nov 7, 2017 · 1 comment
Open

Change Content / Destroy / Reinitialize #170

MountainMaster opened this issue Nov 7, 2017 · 1 comment

Comments

@MountainMaster
Copy link

Hi Kevin,

I'am currently working on a personalization projekt where I want to change the Slider Contents according to some segments. The problem is the timing. When i change the DOM Content the slider has already been initialized. You can see the implementation here: https://www.flatex.de/

Do you know any possibility to destroy and reinitialize the Slider?
Or a safe way to stop the AutoSlide Timeout after(!) I replaced the DOM with the slider in it?

var api = $.data( $('.liquid-slider')[0], 'liquidSlider'); does not work any more when the DOM-Element has been replaced.

Thank you in advance
Tobias

@KevinBatdorf
Copy link
Owner

Unfortunately, destroying/rebuilding is one feature I never got around to adding. You might be able to add a slide in and rerun all the events. You could try to just call api.build() after the code you have there, but it might double up on some things. You could also look inside the build function and just update the variables etc that are inside there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants