[英]jQuery doesn't start after the page has loaded even with a classical (document).ready
大家好,我有一個小問題縫到我身上:
我有此頁面: maelmayon.fr/teddy.php
當您調整大小時,一切都會順利進行,如我所願。 但是我也希望它在頁面上乍一看也能正常工作。 用戶不必調整頁面大小即可看到自己的樣子。
這是使用的jQuery :
$(function(){
resizefunction();
$( window).on('resize',resizefunction);
});
function resizefunction() {
var aside1 = $('aside').height();
var aside2 = $('.archives').height();
var content = $('article').height();
var total = (aside1 + aside2);
$('article').css("height", total+'px');
}
希望你能幫助我。
詩:另一個小問題是:為什么文章的大小比應該的要小一些?
我無法進入頁面,但我猜你的圖像有些混亂,請嘗試
$(window).load(function() {
// executes when complete page is fully loaded, including all frames, objects and images
resizefunction();
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.