0

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?

Community
  • 1
  • 1
chinshr
  • 55
  • 1
  • 9

1 Answers1

1

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.

Luke Ollett
  • 316
  • 2
  • 16