0

I have multiple tabs for users to switch between. For mobile users ideally they could swipe left/right and see the information on each tab. How can I do this in an aura page? I tried it a variety of ways but aura seems to only support regular clicks.

0

Ok, ended up finding the answer, I used ontouchmove for detecting swipe events, event returns a touch object in an event.touches array

edit:

Index.cmp
 <div  ontouchmove="{!c.touchmove}"><!--start touchcontainer-->


IndexController.js
touchmove: function(component, event, helper) {     
         if(!event.touches || event.touches.length == 0)return;
         var xmoved =  event.touches[0].clientX
        //do stuff
},
  • Can you provide the sample code here as how were you able to achieve this? This will be helpful for others in similar situation. – Jayant Das Nov 14 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.