So I was getting started on Onsen UI and used their sample code on the doc website:
<!doctype html>
<meta charset="utf-8">
<link rel="stylesheet" href="lib/onsen/css/onsenui.css">
<link rel="stylesheet" href="lib/onsen/css/onsen-css-components.css">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1,maximumscale=1, user-scalable=no">
<script src="components/loader.js"></script>
<link rel="stylesheet" href="components/loader.css">
<script>
ons.bootstrap();
ons.ready(function() {
// Add another Onsen UI element
var content = document.getElementById("#my-content");
content.innerHTML="<ons-button>Another Button</ons-button>";
ons.compile(content);
});
</script>
<body>
<ons-navigator title="Navigator" var="myNavigator">
<ons-page>
<ons-button onclick="myNavigator.pushPage('page2.html')">Next Page</ons-button>
<div id="my-content"></div>
</ons-page>
</ons-navigator>
</body>
But I got error on "content.innerHTML" saying that content is NULL. I cannot figure out why, any pointer would be apreciated.