Removing click/mousedown/mouseup/touch events
Is it possible to prevent the default events for click/mousedown/mouseup/touch from firing?
I was able to attach my own event on mousedown like so:
var sliderInstance = $(".royalSlider").data('royalSlider');
sliderInstance.ev.on('rsDragStart', function () {
alert('hello');
});
That works... it will fire the alert when I click the image. However, it will then fire the default event which advances the slideshow to the next slide. I do NOT want this to happen. I only want the prev/next arrows to advance the slideshow. How can I override these events?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Dmytro Semenov on 16 Oct, 2012 06:43 AM
Hi,
If you want to disable all mouse/touch navigation just set sliderTouch: false, sliderDrag:false. http://dimsemenov.com/plugins/royal-slider/documentation/#options
Dmitry
2 Posted by zgood on 16 Oct, 2012 12:23 PM
Dmitry,
Thanks! That's what I was looking for, I was just approaching it wrong and over looked those options. I also needed to set "navigateByClick" to false. Great plug-in!
Dmytro Semenov closed this discussion on 16 Oct, 2012 12:31 PM.