特定のページのサイドメニューの追従動作を外す
Showing
1 changed file
with
8 additions
and
0 deletions
... | @@ -212,9 +212,17 @@ if ($this->params->get('logoFile')) { | ... | @@ -212,9 +212,17 @@ if ($this->params->get('logoFile')) { |
212 | var cW = obj.width(); | 212 | var cW = obj.width(); |
213 | var cH = obj.height(); | 213 | var cH = obj.height(); |
214 | var cwrapH = $("#c_wrap").height(); | 214 | var cwrapH = $("#c_wrap").height(); |
215 | // 特定のページではスクロールしない | ||
216 | var excludedPages = [".record-page"]; | ||
217 | var excludedPagesSelector = excludedPages.join(', '); | ||
218 | var isExcluded = false; | ||
219 | if (document.querySelector(excludedPagesSelector)) { | ||
220 | isExcluded = true; | ||
221 | } | ||
215 | 222 | ||
216 | if (cH) { | 223 | if (cH) { |
217 | if (sH > cH) { | 224 | if (sH > cH) { |
225 | if (isExcluded) return false; | ||
218 | $(window).scroll(function() { | 226 | $(window).scroll(function() { |
219 | if ($(window).scrollTop() > offset.top) { | 227 | if ($(window).scrollTop() > offset.top) { |
220 | if ($(window).scrollTop() < cwrapH) { | 228 | if ($(window).scrollTop() < cwrapH) { | ... | ... |
-
Please register or sign in to post a comment