Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
Incomplete tutorial for the "ons-page"
tbrcrl last edited by tbrcrl
Hello, in the following tutorial
The ons object
at page 3/4 it is written
"In this example we are using ons.ready(fn) which waits until the page is completely loaded before executing a callback function."
In the JS code I do not see any
but only a
must be inserted before the
? And must the
be used always, for any page like the
@tbrcrl Hi, thanks for reporting, we’ll update the tutorial info!
ons.readyonly works once, it’s like DOM ready event. If you want to initialize a page, use the
initevent just like is done in the tutorial.
tbrcrl last edited by
Thanks. I need just one more clarification; If in the same .js file I have both jQuery code and Onsen code, shall I put the Onsen code inside the
ons.readyand the jQuery code inside the DOM ready event? that is
@tbrcrl I think you can use
ons.readyfor everything. It should be almost the same as
$(document).ready, if not the same.