使我的列表视图滚动而不是消失在我的页脚后面

时间:2012-11-16 17:53:33

标签: jquery list mobile

这就是我目前的情况:http://i.imgur.com/QyGiM.png

基本上,它是一个使用jQuery和一些AJAX的列表来点击一个网络服务,该服务命中数据库并根据上一个菜单中的用户选择拉动相应的狗。

这适用于移动应用,我希望能够在保持页眉/页脚停留在各自位置的同时向上/向下滚动列表。

以下是相关代码:

列表:

<div ID="dogs" style="text-align:center;width:100%;overflow:auto ">

页脚:

<div data-role="footer" id="footer" class="footer" style="background: url('images/footer.png');width:100%;height:87px;"> footer {position: absolute; bottom: 0; z-index: 1;}

现在,在进行研究时我发现在使用touchOverflow之前,我必须添加:

<script> $(document).bind("mobileinit", function(){ $.mobile.touchOverflowEnabled = true; }); </script>

我拥有,并且没有运气。所以在我看来,我要么需要做一些CSS魔术,要么jQuery还有其他的东西可以帮助我。无论哪种方式,我都爱你的帮助!

谢谢!

1 个答案:

答案 0 :(得分:0)

在您的页脚上尝试position: fixed

相关问题