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.

Dynamically changing spans with jQuery only works on inital page?

  • My app is setup using splitter. Inside splitter, I have the navigation. I noticed when trying to dynamically change contents of span using jQuery (Example: $("#mySpan").text(“new text”); ), this will only work for the first page that is initially loaded. It seems to not work with any other ons-template that is not displayed initally. I’m getting no errors reported in console. Any ideas?

    Edit: grammar

  • I was successfully able to update the span using callback property of pushPage function. However, is there a way to force these pages to update no matter the position in the stack?

  • Onsen UI

    @crankedcode That’s the thing, they are not even in the stack because you didn’t create them yet. They are just templates. There is a moment when the page is created and attached but not visible. You can do changes there. It’s called page’s init event.