我正在使用“jquery.mobile.scrollview.min.js”来使我的div可滚动。我的应用程序适用于任何版本大于5的IOS,当我尝试在IOS版本4.3上运行它时,滚动区域的行为很奇怪。
我的Div如下
<div id="BranchesScrollDiv" class="ui-listview">
<table class='MrPfixedcolumn' width="100%" style="border-spacing: 0; font-family: Arial;
color: #000; font-weight: bold; font-size: small">
<wc id="wcMrPTableContainer" runat="server">
<tr id='MrPcolumn1row1' class="#CssClass#">
<td class='MrProw1' align='left' onclick="BLBranchID=#BranchID#; BLBranchENname=#BranchENname#;BLBranchARName=#BranchARName#;BLCity=#City#;BLArea=#Area#;BLLong=#Long#;BLLati=#Lati#;BLTele=#Tele#;BLEmail=#Email#;BLFax=#Fax#;BLWorkH=#WorkH#; HandleBranchesListRowClicked();" style="width:50%;height:30px;border-right:1px solid #fff;">
<span id='MrPcolumn1row1span' >#BranchValue#</span>
</td>
<td class='MrProw1' align="left" onclick="BLBranchID=#BranchID#; BLBranchENname=#BranchENname#;BLBranchARName=#BranchARName#;BLCity=#City#;BLArea=#Area#;BLLong=#Long#;BLLati=#Lati#;BLTele=#Tele#;BLEmail=#Email#;BLFax=#Fax#;BLWorkH=#WorkH#; HandleBranchesListRowClicked();" style="width:25%;height:30px;border-right:1px solid #fff;">
<span id='Span1' >#CityValue#</span>
</td>
<td class='MrProw1' align="left" onclick="BLBranchID=#BranchID#; BLBranchENname=#BranchENname#;BLBranchARName=#BranchARName#;BLCity=#City#;BLArea=#Area#;BLLong=#Long#;BLLati=#Lati#;BLTele=#Tele#;BLEmail=#Email#;BLFax=#Fax#;BLWorkH=#WorkH#; HandleBranchesListRowClicked();" style="width:25%;height:30px;">
<span id='Span2' >#AreaValue#</span>
</td>
</tr>
</wc>
</table>
</div>
我在文档中应用了滚动,如下所示
$("#BranchesScrollDiv").scrollview({ direction: 'y' });
$("#BranchesScrollDiv > .ui-scrollbar").addClass("ui-scrollbar-visible");
任何人都可以建议我如何解决这个问题?
提前致谢。
答案 0 :(得分:2)
$("#BranchesScrollDiv").scrollview({ scrollMethod: 'translate', direction: 'y' });
而不是
$("#BranchesScrollDiv").scrollview({ direction: 'y' });
我希望通过这个答案帮助其他人