Monaca Onsen UI Discord Chat Github Repo

How can I trap a event after template DOM load will be complete if I use a splitter?

  • Hi, how can I execute code after completely load of page when I’m using a splitter?
    I’m try to change on the fly the page, but the elements in the page are not ready after load template.
    I’m using:
    window.fn.load = function (page) {

    var content = document.getElementById('content');
    var menu = document.getElementById('menu');


    settingsContent is a p with id=“settingsContent” in the template I’m loading.

    $("#settingsContent") selector has length = 0 because the DOM seems to be alteady the previous page.

    How can I trap a event AFTER DOM load will be complete?


  • Onsen UI

    @GiorgioB68 did you try using the regular page lifecycle events such as init or show?