jQueryでの高さ取得の件で
-
外部jsで以下コードを読み込みさせているのですが、
高さ取得の箇所で、
.swiper-containerから#mastheadを差し引いた高さを取得としたいのですが、
heroBottom = jQuery(‘.swiper-container’).height(); の箇所をどのように書き換えすればよろしいでしょうか?よろしく回答のほどお願いいたします。
jQuery(function(){ var _window = jQuery(window), _header = jQuery('#masthead'), heroBottom; _window.on('scroll',function(){ heroBottom = jQuery('.swiper-container').height(); if(_window.scrollTop() > heroBottom){ _header.addClass('transform'); } else{ _header.removeClass('transform'); } }); _window.trigger('scroll'); });
1件の返信を表示中 - 1 - 1件目 (全1件中)
1件の返信を表示中 - 1 - 1件目 (全1件中)
- トピック「jQueryでの高さ取得の件で」には新たに返信することはできません。