在jQuery Mobile中更改orientation上的数据角色

时间:2012-10-19 21:31:53

标签: jquery-mobile

我正在使用JQM构建一个非常简单的移动网页,该网页使用data-role =“footer”来创建静态页脚。

它在纵向模式下运行良好,但在横向显示时,页脚占据了可用空间的很大一部分,实际上会影响用户体验。

我试过了:

$(window).orientationchange(function(){
    $("#foot").removeAttr("data-role");
});

$(window).orientationchange(function(){
    $("#foot").attr("data-role","none");
});

但都没有奏效。

有没有人知道是否有办法根据JQM事件成功修改数据角色?

感谢。

0 个答案:

没有答案