Comments (5)
That's not supported by C2 and it really sounds like an extreme edge case. You can either append or prepend slides to the container with the "add" command. To prepend, add a third argument of true
.
from cycle2.
Hi malsup,
well... it's not that extreme :)
You have an example which displays tweets in a vertical carousel. Imagine this scenario.
Every minute an AJAX call is made to fetch new tweets. When a new tweet comes, it should be inserted just after currently showed slide. Appending new tweets leaves user "out of date" as it might take minutes to cycle to new tweets.
Let me know your thoughts on this.
from cycle2.
I would argue that the tweets should always be in chronological order and that inserting new ones somewhere in the middle doesn't make sense. Given that, I suggest either appending or prepending the new slides and then programmatically advancing the slideshow to the desired slide index.
See 'goto' docs: http://jquery.malsup.com/cycle2/api/#commands
from cycle2.
Thank you for answering the question about prepending! I've been looking all over for that!
from cycle2.
I have been looking for how to prepend for about an hour. I guess it could be really helpful for others if something about the prepend option were to be included in the API documentation.
from cycle2.
Related Issues (20)
- Carousel Offset both sides
- How to avoid validation errors with <div class="cycle-slideshow".... tag HOT 1
- Replace $.trim() with String.prototype.trim() HOT 4
- Limit images loaded
- Неработает HOT 1
- issues with latest wordpress update HOT 7
- Captions and Overlay not displaying
- Embed youtube videos
- Slideshow Not Working
- Slides overlap content HOT 5
- Website is broken HOT 2
- I can't turn off the autoplay
- cycle2 stopped working! HOT 3
- When the page refreshes during screen size changes the carousel disappears HOT 1
- Custom Pager Template does not close parsed string
- Are `cycle-update-view-before/after` events safe to use in production code?
- Cycle2 prev/next function not working for me HOT 3
- [Solution] Add endless slides dynamically
- <div class="cycle-slideshow lightbox" data-cycle-prev="#prev-10606" data-cycle-next="#next-10606" data-cycle-pager="#pager-10606"> <!-- IMAGES --> <div id="prev-10606" class="cycle-prev"></div> <div id="next-10606" class="cycle-prev"></div> <div id="pager-10606" class="cycle-prev"></div> </div>
- hasOwnProperty is not a function using jQuery 4.0.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cycle2.