[[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>