// JavaScript Document /* smoothsccroll */ $(function(){ $().smoothscroll({ btnMode : 'slide', btnCourse : 'bottom', autoAdjust : true, adaptiveElement : 'header',/* manualAdjust: 30,*/ btnAdvent : 100, btnSpeed : 500, pageJumpScroll : true, wrapHeightCtrl : true }); /* ハンバーガーメニューをオートで閉じる処理 */ $('.nav a').on('click.amc', function(){ if( $("#navbar").hasClass("in") ) { // ナビ展開中のみ、ハンバーガーボタンをオートクリックする $(".navbar-toggle").click(); } }); $(window).on('load.ahc resize.ahc scroll.ahc', function(){ if( $("#navbar").hasClass("in") == false ) { // ナビ収納中は、ナビ容器の高さを制御する $('header').css('height',$('.inner_header').outerHeight()); } }); $(window).on('load resize', function(){ /* 要素のheight値を合わせるjQuery */ $('.area0 div.fl_left,.area0 div.fl_right').matchHeight(); }); /* practice jQuery - SP MODE MENU HEIGHT CONTROL */ $(window).on('load.nassel resize.nassel',function(){ // event ロード時、リサイズ時、回転時 名前空間を試しに使ってみる orientationchange.nassel console.info('-- ( check test ) ----'); /* code area */ testcode = {}; testcode.windowheight = $(window).height(); testcode.headerheight = $('header').outerHeight(); testcode.navheight = $('nav').outerHeight(); console.log('window-height : ' + testcode.windowheight + 'px'); console.log('header-height : ' + testcode.headerheight + 'px'); console.log('nav-height : ' + testcode.navheight + 'px'); console.info('-- ( end check test ) ----'); $('nav').css('max-height', testcode.windowheight , 'overflow-y'); return this; }); });