-
Notifications
You must be signed in to change notification settings - Fork 443
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
Destroy and build method #5
Comments
Typical case : I run a first time the slider with an ajax call. It works great and I have (2) slides and animations. I load another link with ajax and some other images (3). The slider seems to be totally broken because it create two nested "slides-control" divs. <div id="bg" style="display: block; ">
<div class="slides-control" style="position: relative; width: 4749px; height: 923px; left: -1992.2720908100137px; ">
<div class="slides-control" style="position: relative; width: 4749px; height: 923px; left: -1583px; ">
<ul class="bgimgs" style="display: block; ">
<li style="display: block; position: absolute; overflow: hidden; top: 0px; left: 3166px; z-index: 0; width: 1583px; height: 923px; " class=""><img src="img/backgrounds/bg-waffle1.jpg" alt="" style="left: -8.5px; top: -288.5px; "></li>
<li style="display: none; position: absolute; overflow: hidden; top: 0px; left: 1583px; z-index: 0; width: 1583px; height: 923px; " class=""><img src="img/backgrounds/bg-waffle2.jpg" alt="" style="left: -8.5px; top: -288.5px; "></li>
<li style="display: block; position: absolute; overflow: hidden; top: 0px; left: 1583px; z-index: 2; width: 1583px; height: 923px; " class="current"><img src="img/backgrounds/bg-crepe1.jpg" alt="" style="left: -8.5px; top: -288.5px; "></li>
<li style="display: none; position: absolute; overflow: hidden; top: 0px; left: 1583px; z-index: 0; width: 1583px; height: 923px; " class=""><img src="img/backgrounds/bg-crepe2.jpg" alt="" style="left: -8.5px; top: -288.5px; "></li>
<li style="display: none; position: absolute; overflow: hidden; top: 0px; left: 1583px; z-index: 0; width: 1583px; height: 923px; " class=""><img src="img/backgrounds/bg-crepe3.jpg" alt="" style="left: -8.5px; top: -288.5px; "></li>
</ul>
</div>
</div>
</div> I have my first 2 slides and my next 3 slides loaded inside the first call of the slider. That's too bad... Maybe it's is just to create a system to destroy the slider, load images again and rebuild the slider? Or I forgot something, but if you have an idea... PS: it would be very great :) |
I'm going to add an update method in 0.4.1 that will allow Ajax functionality. |
You can can now append slides through the API:
|
Update: 0.5.0 will include a |
Another suggestion : for ajax calls and replacing content in the slider, why not add two methods? A destroy function to remove the slides and stop the slider, another one to rebuild it. It would be great.
The text was updated successfully, but these errors were encountered: