2012-05-17 27 views
5

Vì lý do nào đó, trên iPad, chuyển động trượt jquery di động giữa các trang hoạt động hoàn hảo khi đó là một swipe mặc định trái [slide]. Nhưng khi vuốt sang phải [trượt ngược], có vẻ như là một trang trắng đầy đủ trống rỗng ở giữa các trang trong quá trình chuyển đổi.jquery di chuyển trượt chuyển tiếp ngược lại cho thấy trang trống ở giữa quá trình chuyển đổi

<div data-role="page" id="zine1"> 
    <div data-role="content">  
       VARIOUS HTML CONTENT 
    </div><!-- /content --> 
</div> 
<div data-role="page" id="zine2"> 
    <div data-role="content">  
       VARIOUS HTML CONTENT 
    </div><!-- /content --> 
</div> 
<div data-role="page" id="zine3"> 
    <div data-role="content">  
       VARIOUS HTML CONTENT 
    </div><!-- /content --> 
</div> 
<script> 
    $(document).ready(function() { 
     window.now = 1; 

     //get an Array of all of the pages and count 
     windowMax = $('div[data-role="page"]').length; 

     doBind(); 
    }); 
    // Functions for binding swipe events to named handlers 
    function doBind() { 
     $('div[data-role="page"]').live("swipeleft", turnPage); 
     $('div[data-role="page"]').live("swiperight", turnPageBack); 
    } 

    function doUnbind() { 
     $('div[data-role="page"]').die("swipeleft", turnPage); 
     $('div[data-role="page"]').die("swiperight", turnPageBack); 
    } 

    // Named handlers for binding page turn controls 
    function turnPage(){ 
     // Check to see if we are already at the highest numbers page    
     if (window.now < windowMax) { 
      window.now++ 
      $.mobile.changePage("#zine"+window.now, {transition:"slide"}); 
     } 
    } 

    function turnPageBack(){ 
     // Check to see if we are already at the lowest numbered page 
     if (window.now != 1) { 
      window.now--; 
      $.mobile.changePage("#zine"+window.now, {transition:"reverse slide"}); 
     } 
    } 
</script> 

Trả lời

11

quá trình chuyển đổi: "trang trình bày ngược" dường như không còn được dùng nữa. Hãy thử hướng dữ liệu = "đảo ngược".

Các vấn đề liên quan