How to use jquery to load external html data in a variable in phonegap -
i using phonegap create small app. have url points server somewhere giving me simple html either has "available" in body or has else.
i trying write jquery recognize "available" , populate element information. it's enough shows word "available".
this have now, doesn't append paragraph:
<p class="result">x</p> <script> $( "#result" ).load( "http://someurl.com", function() { $('p.result').append(result); }); </script> thank in advance,
antonio
your code wrong.
do not complicate this. wrote:
<script> // $(function() { ... }); same $(document).ready(function() { ... }); // calls function after dom ready manipulations. $(function() { $(".result").load("test.html"); }); </script>
Comments
Post a Comment