0
在JQM中,我希望有一個固定頁腳,但同時頁面的最大寬度(內容在左側)。它工作正常,直到我添加data-position =「fixed」(固定頁腳)。頁腳現在填滿了整個窗口,而不僅僅是480px。這是好還是它是一個錯誤?任何想法如何解決這個問題?JQM固定頁腳「浮動」
<div data-role="footer" data-theme="a" data-position="fixed"><h1> </h1>
</div>
JS:
$(document).ready(function(){
if ($(window).width() > 480) {
$('#page1, #gubbo').css('width', '480px');
}
});
$(window).resize(function() {
if ($(window).width() <= 480) {
$('#page1, #gubbo').css('width', '');
} else {
$('#page1, #gubbo').css('width', '480px');
}
});
什麼元素獲得了「gubbo」id? – TheWandererr
gubbo是多頁面中的一頁。 Page1是另一個。 –