开发者

Jquery mobile Link clicked twice the page disappears

I have the problem that when I click a navigation link it shows the page as it should. But if I click on the link again it loses all of its contents.

Is there someone who knows how I solve this?

I use jquery.mobile-1.0b2.min.js

    <div id="nav">
  <ul>
    <li class开发者_开发问答="red btn"><a class="tildig" href="#tildig" data-transition="fade" >
      <p>TIL DIG</p>
      </a></li>
    <li class="blue btn"><a class="kontakt" href="#kontakt"data-transition="fade" >
      <p>KONTAKT / BOOKM&Oslash;DE</p>
      </a></li>
  </ul>
</div>

<!-- Start of page -->

<div data-role="page" id="tildig">
  <div data-role="header" data-nobackbtn="true"> </div>
  <div data-role="content">
    <p>Dette er siden TIL DIG<br>
      Jeg er nummer 3</p>
  </div>
  <div data-role="footer"> </div>
</div>

<!-- End of page -->

<!-- Start of page -->

<div data-role="page" id="kontakt">
  <div data-role="header" data-nobackbtn="true"> </div>
  <div data-role="content">
    <p>Dette er siden KONTAKT / BOOKM&Oslash;DE</p>
  </div>
  <div data-role="footer"> </div>
</div>

<!-- End of page -->

Java

http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js

http://code.jquery.com/jquery-1.4.4.min.js


I think i know what your problem is - at least I had some very similar stuff where a listview kept dissapearing - had to do with jqm caching.

<div data-role="page" id="book_index" data-dom-cache="true">

This attribute made the page reappear, hope it helps

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜