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
Hi Jack,
Try this (It is similar):
setTimeout(function() { $('.click-back-btn').click(); }, 1500);
Regards
Paulo Cação wrote:
Thank you for your reply. However this one is not working. :(
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/
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
Hello Jack Wong,Have you used the jquery plugin? Like http://code.jquery.com/jquery-1.9.1.js.