2012-07-20 74 views
0

我在jQuery的移動文件上使用scrollview插件,並在iOS上很好地工作。但是,當我使用iframe時,不應用滾動y,並且其內容保持不變。如何在iframe上應用滾動條?謝謝iOS的jQuery的滾動視圖插件不滾動Y的iframe

<div data-role="page" id="init" data-theme="a"> 

    <div data-role="header" id="head" data-position="fixed" data-tap-toggle="false"> 
    </div> 
    <div data-role="content" data-scroll="y" id="cont" data-theme="a" style="border:none;"> 
     <iframe data-scroll="y" src="http://www.abcd.com" style="border: 0px none;" height="100%" width="100%"> 
     </iframe> 
    </div> 
    <div id="id3"> 
    </div> 
</div> 

所有必要的jQuery的移動和滾動視圖插件附加。

+0

請顯示您的代碼。 – hekomobile 2012-07-20 21:21:11

回答

0

請@Jaume試試這個,

$(function() { 
    $('#cont').scrollview({ 
     direction:'y' 
    }) 
}) 

否則,您需要包含jquery.mobile.scrollview.js文件。