jqtouch load content with ajax
Posted
by
ndrizza
on Stack Overflow
See other posts from Stack Overflow
or by ndrizza
Published on 2011-11-28T01:37:15Z
Indexed on
2011/11/28
1:50 UTC
Read the original article
Hit count: 286
I am loading this page directly inside of jqtouch. First the page shows "Loading..." Then it should execute a GET Request and refresh the content of the div ("tagcloud") as soon as it get's the content from another php file.
(I prefer to load the content this way as otherwise jqtouch freezes for 2 seconds until the content is loaded and then animates to the next page.)
<?php
$link = $_GET['link'];
?>
<div id="TagNews">
<div class="toolbar">
<h1>TagNews</h1>
<a href="#" class="back">NZZ</a>
</div>
<div id="tagcloud">Loading...</div>
<script type="text/javascript">
$.get("cloudnews2.php?link=<?php echo $link; ?>", function(data){
document.getElementById("tagcloud").innerHTML = data;
});
</script>
</div>
Howewer, the request never gets loaded.
The code is working outside of jqtouch. But inside jqtouch the GET
Request doesn't work. I can't figure out why.
Could you please help me to do this request?
© Stack Overflow or respective owner