323
Views
5
Comments
Javascript is not work on Mobile App
Question

Hi

I would like to ask about javascript on Mobile App(iOS - iPad). I would to click the Back Button after 1.5 second by class. I use following JS working on Browser but not work on Mobile App(iOS - iPad).

setTimeout(function() { document.querySelector('.click-back-btn').click(); }, 1500);

Please suggest how to change this function to working on iOS - iPad

Thanks

2025-01-07 17-06-54
Paulo Cação
Champion

Hi Jack,

Try this (It is similar):

setTimeout(function() { $('.click-back-btn').click(); }, 1500);


Regards

UserImage.jpg
Jack.Wong

Paulo Cação wrote:

Hi Jack,

Try this (It is similar):

setTimeout(function() { $('.click-back-btn').click(); }, 1500);


Regards

Thank you for your reply. However this one is not working. :(


UserImage.jpg
Stelea Alexandru

Hello,


Please check the below discussion:


Maybe will help you.

https://www.outsystems.com/forums/discussion/37236/javascript-settimeout-delay-not-working-when-trying-to-implement-session-auto-log/

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

The solution from Paulo does not work as default mobile app does not have jQuery. And it is also advices not to use it for performance reasons.

For vanilla JavaScript Dom selection you can check https://blog.garstasio.com/you-dont-need-jquery/selectors/#by-css-class


2018-09-07 10-04-42
Suhas Jamdade

Hello Jack Wong,

Have you used the jquery plugin? Like http://code.jquery.com/jquery-1.9.1.js.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.