Hello,
I've been doing development for the PlayBook with WebWorks, and I'm new to jQuery.
My question has to do with using jQueryMobile and HTML generated from javascript - specifically on PlayBook. I've successfully used jQueryMobile in the static HTML part, but if I have it dynamically generated from the javascript, it doesn't seem to work (UI looks just like if none of the CSS from jQueryMobile was applied to it).
Here's roughly an example of what I have:
index.html:
<div data-role="page">
<div data-role="header" data-position="inline" data-backbtn="false">
<h1>My title</h1>
<a href="index.html" data-icon="gear" class="ui-btn-right">Options</a>
</div>
<div data-role="content">
<!-- the following works fine -->
<a HREF="#" data-role="button" data-inline="true" onclick="addMessage()">A Button</a>
<div id="contents"></div>
</div>
...
</div>
in my javascript i have:
var ele = document.getElementById("contents");
var output = "";
...
output += "<a HREF=\"#\" data-role=\"button\" data-inline=\"true\" onclick=\"doSomething()\">Does NOT work</a>";
...
ele.innerHTML = output;
...
Am I doing something wrong? or has anyone ran into this problem?
thank you!