Search code examples
jquerybuttonjquery-mobileonclicktyped.js

jQuery Typed.js mobile devices onClick


I'm trying to make a webpage in which I've used typed.js. Its working fine. But then it also has buttons and respective onclick events which do not work in mobile phones.

I've gone through many websites for help regarding the same but no luck so far.

When I try document.ready, typed.js stops working.

Any idea what can be used?
Can holdReady be a solution?


Solution

  • [RESOLVED]
    Using touchstart and touchend solved my problem!

    $('#buttonId').on('touchstart touchend', function(e) {
    e.preventDefault();
    //mycode
    });