[[jQueryめも]]

*メニューが開いている間は背景を固定する [#uc5ddf72]

 <style>
 .scroll-prevent {
     position: fixed;
     z-index: -1;
     width: 100%;
     height: 100%;
 }
 </style>

 <script>
 // メニューを開いた時
 $('html').addClass('scroll-prevent');
 
 // メニューを閉じた時
 $('html').removeClass('scroll-prevent');
 </script>


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS