How to replace an entire page in jQTouch with another
I have been trying to replace the contents of a page using jQTouch to no success. My problem is related to this question
$('div.current').replaceAll(html)
When I try to do that, the开发者_运维问答 entire page disappears. Does anyone have a solution for this?
You should try creating a new div with your new contents, and then transition to that.
using r148 of JQT ...
var new_div = '<div id="new_div">Hello</div>';
$('#jqt').append(new_div);
jQT.goTo('#new_div','slide');
If you are not using 148 I think you could just append to the body tag.
Or maybe you could just use $('div.current').html(html)
which would not replace the div itself which you need, just the contents inside.
精彩评论