4

关于工具栏的 jQuery mobile、phonegap 和 android 的组合,我有一个问题。更准确地说,我希望我的页眉和页脚在我输入文本区域后保持稳定(data-position="fixed")。

我还在页眉和页脚中包含属性 data-tap-toggle="false",但是在我在文本区域上写一些内容并返回页面后,页脚和页眉不再“固定”,我必须再次触摸屏幕以便再次可见和固定。

有什么建议吗?先感谢您。

4

3 回答 3

1

最好的解决方案(对我来说完美)是:

https://github.com/watusi/jquery-mobile-iscrollview

它是 jquery mobile 和 iscroll 的组合。基本上,它完成了加入上述 2 个库的所有令人讨厌的工作。

于 2012-10-04T10:43:24.710 回答
0

I had the same issue on Android 4.0.3 . I had a list with a search box. As soon as I tap the search box for input, the header and footer lost their fixed position. I got a very simple fix work for me.

    $('input[data-type=search]').live("focus", function() {
        $("[data-role=header]").css('position','fixed');
        $("[data-role=footer]").css('position','fixed');
    });

Hope it works !

于 2013-02-15T05:29:25.667 回答
0

我在 iOS 上遇到了完全相同的问题。几个小时后,尝试了几种不同的方法,我选择了iScroll。如果除此之外还有其他答案,我很乐意听到。

于 2012-08-30T12:59:46.760 回答