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.
DOM problems with jquery
-
First of all thank you for all your work.
There are some problems with the DOM, i’ve seen a few topic but using timeout function isn’t really the solution … I want to create a chart with Chart js but it isn’t finding the canvas because it isn’t hooked to the dom. Should I use pageinit ? Do you have a function that waits for the specific page to load?
Thanks
-
Hello @BladeOfRage!
Timeout is of course not the solution. We have mentioned it for testing purposes. The correct place to initialize a page is in its
init
(Onsen 2) orpageinit
(Onsen 1.x) event. I think this code could be useful for you: https://github.com/frankdiox/OnsenUI-Material-Tabbar/tree/js-implementation
It’s implemented in pure JS so using jQuery should not be very different.