开发者

adding a page to jqtouch

So I have something like this:

<html>
  <body>
    <div id="jqt">
      <div id="page1">
         ...
      </div>
       ....
      <div id="generic">
        Some generic page to开发者_如何学Python use as a template
      </div>
    </div>
  </body>
</html>

and I want to create a new page on after everything is loaded and the user does some action.

$('#generic').clone().attr('id', 'some_new_page').appendTo('#jqt');

What happens is the new page ends up showing up in front of everything and doesn't seem to have and jqtouch events or styles added.

How do initialize this page (or at least have jqtouch reinitialize the whole html file)?

I don't want it to show up at first, I just wanted loaded and ready in the background.


Have you tried to do a deep clone with data and events instead?

$('#generic').clone(true, true).attr('id', 'some_new_page').appendTo('#jqt');
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜