2011-10-27 1 views

答えて

1

デモでは以下の変更を行います。

#content { 
    padding: 0px; 
    margin: 0 auto; 
    margin-top:200px; 
    width: 700px; 
    text-align:left; 
    z-index:1; 
    position: relative; 
} 

#layout { 
    width: 700px; 
    position:absolute; 
} 

完全なJSファイル:

<!-- Function --> 
var positionClosed = 0; // the vertical position of the title when minimized 
$(function(){ 
    positionClosed = $(window).height() - // window size 
    $('#footer').height() - // footer size 
    $('#content').css('margin-top').replace('px', '') - // margin from top 
    $('.trigger').height() - // title size 
    20; // a little margin 

    $("#content").css('top', positionClosed); 
    $('.toggle_container').hide(); 

    $(".trigger").click(function(){ 
    $(this).toggleClass("active").next().slideToggle("slow"); 
    if(!$(this).hasClass('active')) 
     $('#content').animate({top: 0}, 'slow'); 
    else 
    $('#content').animate({top: positionClosed}, 'slow'); 
    }); 
}); 
1

を要求しますヘッダ。

+0

述べたが、ここでは使用はデモリンクされていないとして、私は試してみる@ http://bit.ly/vy0lO5 CSSで

コンテンツは、タイトルがスムーズにページの下部に行くはずです... –

関連する問題