Elisabeth England
Elisabeth England

Reputation: 1

Need to add touch events?

So I'm having a little trouble adding touch events so I can get this page slider to work. It works with the scroll mouse and keys but not on mobile touch. See code in codepen link....

<p data-height="265" data-theme-id="0" data-slug-hash="EyLWKg" data-default-tab="js,result" data-user="WispProxy" data-embed-version="2" data-pen-title="Gray & White - Skewed Slider with Scrolling" class="codepen">See the Pen <a href="https://codepen.io/WispProxy/pen/EyLWKg/">Gray & White - Skewed Slider with Scrolling</a> by Victor Belozyorov (<a href="https://codepen.io/WispProxy">@WispProxy</a>) on <a href="https://codepen.io">CodePen</a>.</p>

Upvotes: 0

Views: 62

Answers (1)

Winston Parker
Winston Parker

Reputation: 61

  1. Make sure you have JQuery
  2. Add this to your JS file

    $('.codepen a').on('click touch',function(){ 
      $('.codepen a').click(); 
     });
    

Upvotes: 1

Related Questions