Comments (7)
Hi, I will take a look maybe tomorrow.
from tiny-slider.
Much appreciated. Turbolinks / ajax-like javascript in general are becoming a thing.
Since, as you may have noticed, I like tns
, seeing them married would be great!
from tiny-slider.
I see.
- I didn't see
container
inoptions
, are you using default.slider
? - And do all pages using the same structure (
container
andcontrolsContainer
)?
According to turbolinks
:
turbolinks:load
fires once after the initial page load, and again after every Turbolinks visit. Access visit timing metrics with theevent.data.timing
object.
General idea:
- Can you try just initiate
tns
once? - Before every Turbolinks visit, you may need run
slider.destroy()
to removeeventListener
s, clean some memory. - Since
slider
is supposed to change, it's better to uselet
.
from tiny-slider.
from tiny-slider.
Deleting window.onload
+ slider() function call from turbolink:load event did the trick, although I'm a little confused. Thanks anyway for the hint to load it just once 👍
from tiny-slider.
Hi, the function getSlideEdges
in version 1 requests that the slides be loaded before the initialization. But I will update it later to make it work better with dynamically loaded content.
Version 2 doesn't have this issue.
Regardless of version, to initiate tns
more than 1 times will probably make troubles.
Thanks for letting me know your case anyway.
from tiny-slider.
from tiny-slider.
Related Issues (20)
- Arrow keys not working
- How to make images clickable HOT 2
- .
- Local storage and EU compliance HOT 1
- Uncaught DOMException: Failed to execute 'appendChild' on 'Node': Only one element on document allowed HOT 1
- Slide does not keep state when shown as cloned version when loop: true HOT 1
- Can't import as ES module: `SyntaxError: ambiguous indirect export: tns` HOT 1
- [Feature request] Customizable autoplayButton markup HOT 1
- [aria-*] attributes do not match their roles HOT 2
- Adding slides does not work.
- 'gallery' mode + Delay time between slides
- Is this project still alive? - No Merges (even supply chain)... HOT 3
- Tiny Slider not working well with htmx library.
- Add Export before: var tns =
- Please provide method to refresh edgePadding and gutter or allow clamp values
- edgePadding on vertical axis not working?
- Deprecation Using / for division outside of calc()
- Freezable possible issue
- Rotate the carousel with mouse scroll
- question about navigation or dots 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 tiny-slider.