开发者

How to replace an entire page in jQTouch with another

开发者 https://www.devze.com 2023-01-11 03:36 出处:网络
I have been trying to replace the contents of a page using jQTouch to no success. My problem is related to this question

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消