Comments (4)
If I understand correctly you mean what happens when you mousedown and drag on a link inside a slide, you can disable this behavior by calling preventDefault on the mousedown event on the link element, see the following example : https://jsfiddle.net/rg0cq8Lf/3/
Maybe I'll add an option to the library that will does this for all links in the carousel..
from itemslide.
Quick idea:
I think a other "hotfix" will work better for you:
create an onDragStart function wich sets https://developer.mozilla.org/de/docs/Web/CSS/pointer-events on all links to none.
After onDragEnd you remove that css command.
from itemslide.
Unfortunatly the solution is not working. The Link is been called when you start sliding on the Link. You don't see any effect, because the Link goes to '#'. So you stay on the same Page.
I forked the jsFiddle and added real links to the href: https://jsfiddle.net/7uj1cer9/
from itemslide.
This is a browser wide topic. What do you use to test? Welcome in the world of browsers and their implementation 🎉
I made quick tests that works for me in chrome. Feel free to test it in all browsers and versions.
$("a").on("mousedown touch click", function(event) {
event.preventDefault();
});
from itemslide.
Related Issues (20)
- Attaching events to dynamically added items HOT 1
- Disable? HOT 1
- Two carousels in the same page HOT 1
- Fade Transition, its possible? HOT 2
- Auto Sliding HOT 3
- Problem when using more than one itemslide per page HOT 3
- Rewind slides and performance issue with too many items
- After using addSlide, the swipe is not working properly HOT 2
- Avoid scroll page when slide is touched HOT 1
- relative display HOT 6
- Css problem HOT 2
- Multiple sliders: only one options array HOT 1
- left carousel and buttons next not work HOT 2
- I found click issues, please resolve them HOT 1
- I found scroll issue, please resolve them HOT 2
- Remove jQuery/Zepto dependency
- Replace browserify with webpack
- Add dynamic information footer that syncs with active slide HOT 4
- dos you have solution for RTL HOT 3
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 itemslide.