Comments (16)
Noted. Will keep this in mind for the next release.
from flexslider.
Any hint's on where to look to disable this?
I made the mistake of putting too much time into basing my design on this slider, can't really go back ;-)
from flexslider.
The problem is that you don't want to disable touch, but you would like to validate before allowing the touch event to happen, correct?
Fully disabling touch is easy, but this would take a little more doing.
from flexslider.
Running a function that can stop the slide would be optimal yes.
But a temporary quick-disable would be great :-)
from flexslider.
Comment out lines 261 - 332 in jquery.flexslider.js. That is the touch functionality.
To add your logic, you would add it to the onTouchStart function and prevent/enable the addEventListenter for touchMove and touchEnd. Hopefully that makes sense.
from flexslider.
I'm trying to disable it without changing the code, since i'm using the slider on several pages.
I tried adding this to the before () function, but it seem to disable all sliding on mobiles (even buttons).
Work's fine on desktop though.
before: function(slider) {
slider.each(function() {
if ('ontouchstart' in document.documentElement) {
this.removeEventListener('touchmove', onTouchMove, false);
this.removeEventListener('touchend', onTouchEnd, false);
}
});
},
Any suggestion on how to disable it without removing code?
from flexslider.
You're requirements are too specific to avoid messing with the core, as I see it. The before function isn't called when you touch the slider, only when they let go and it decides where it needs to go.
from flexslider.
Ok, thanks for the support. I'll go with two flexslider files until there's a proper setting for this. Thanks again for a great plugin!
from flexslider.
Have this feature added to flexslider? I would need something similar: user needs to do something before (s)he can go to next slide. And on next slide same thing again. I didn't find anything touch related on lines lines 261 - 332 like was suggested earlier.
from flexslider.
I found this simple solution. Use
touch: false,
worked for me though.
from flexslider.
I have drag and drop quiz in my slide page. My requirement is to disable slider swipe on touch. How do disable touch dynamically? I used the below code but it is not working. Any solution would be of great help. Thank you in advance.
$( ".drag" ).draggable({
revert: "invalid",
helper: "clone",
//cursorAt: {left:50},
cursor: "move",
start: function( event, ui ) {
//alert("started");
$ci_content.flexslider({
touch:false
});
},
stop: function( event, ui ) {
//alert("stopped");
$ci_content.flexslider({
touch:true
});
}
});
from flexslider.
Looking for the same thing.. How do disable touch dynamically?
from flexslider.
Hi uili,
I done that with the help of flag variable, when it is set to 1.
I will go to events(touchstart , touchmove and touchend) in flexslider and put condition there like
if(dragFlag == 1){
return;
}
Have to put it in three places
from flexslider.
Yeap, thanks for taking me to the right direction, this worked for me! but the main idea would be not to change the core!!
from flexslider.
@uili : Can you suggest me something without changing the core, did you find any other solution. It would be great if I find some other solution
from flexslider.
@sathiyaVGE : I could not find any other solution, the way you did had suited my needs, but ill keep looking for something else, and update this post if i find!
from flexslider.
Related Issues (20)
- Prevent vertical swipe while swiping horizontally HOT 2
- Fix for Number-typed values are deprecated for jQuery.fn.css
- Forbid to tab through the slider HOT 1
- swipe is reverse in RTL
- $( '.flexslider' ).flexslider({ is not running occasionally HOT 1
- hiding slides with display:none to filter them... way to 'recount' the slides after doing so
- Using iframes (yt-videos) in flexslider breaks the last slide (animation: slide)xslider HOT 1
- Trouble placing multiple instances of flexslider on a website or page
- When animationSpeed becomes large, the image doesn't switch to a smartphone with Chrome's Devtools.
- The package could not be installed. Trying to install the plugin, get an empty plugin error?
- Fetching Thumbnail images dynamically
- Not compatible with Google Chrome and rtl mobile browsers HOT 1
- Is FlexSlider abandoned? HOT 1
- fix scrolld in 5000 min
- How to setup Flexslider in a gulpfile HOT 1
- FlexSlider prevents use of back/forward cache
- does not start on the first slider HOT 1
- slide container gets bigger when another slide has a tall vertical or horizontal image
- Cannot read properties of undefined (reading 'toLowerCase'
- thumbCaptions setting creates invalid html
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 flexslider.