I have the following block of code in a jQTouch app I'm working on:
<div class="info">
<div id="MyValue">Sample Text</div>
</div>
<p onclick="ResetValue();">
Reset
</p>
When writing my ResetValue method, the following jQuery syntax does not work:
$("MyValue").html("Changed Text");
However, if I use the "classic" method, the following text does work:
var value_block = document.getElementById("MyValue");
value_block.innerHTML = "Changed Text";
Is there something I'm missing with jQTouch or jQuery in general that is preventing the jQuery style code from working?
Note: I've also tried "wiring up" the click event to the paragraph (instead of using onclick directly in the tag) and get the same result.