サイドバーのあるウェブアプリを作成していますが、サイドバーを常にこのようにビューポートに配置したいと思います
また、アプリがフルスクリーンモードのときにビューポートに適合します。jqueryでこれを達成するにはどうすればよいですか?ドキュメントの高さからヘッダーの高さを差し引いてみました
$(document).ready(function() {
var bodyheight = $('body').height();
$(".app-sidebar").height(bodyheight);
});
// for the window resize
$(window).resize(function() {
var bodyheight = $(document).height();
var header = $('.app-north').innerHeight();
$(".app-sidebar").height(bodyheight - header);
});