質問編集履歴
2
動作しない内容を具体的に追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
内部ページリンクをJavaScriptでスムーススクーロール、およびTOPメニュー固定しているためヘッダーの高さも調整しています。
|
4
4
|
|
5
5
|
ブログ記事目次などの挙動はうまくいっているのですが、グローバルメニュー内の内部ページリンクだとうまく動作しません。
|
6
|
+
|
7
|
+
※スクロールでのリンクにならず、100px分下げている「var headerHeight = 100; //固定ヘッダーの高さ」この部分が機能していません。
|
6
8
|
|
7
9
|
Chromeのディベロッパーツールで確認してもエラーが出ていないため、原因がわかりません。
|
8
10
|
|
1
該当部分のHTML追記いたしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -79,3 +79,79 @@
|
|
79
79
|
</script>
|
80
80
|
|
81
81
|
```
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
```HTML
|
86
|
+
|
87
|
+
<header id="top-head">
|
88
|
+
|
89
|
+
<div class="inner">
|
90
|
+
|
91
|
+
<div id="mobile-head">
|
92
|
+
|
93
|
+
<a href="https://yzan.jp/">
|
94
|
+
|
95
|
+
<span class="logo"><img src="https://yzan.jp/wp-content/uploads/2018/01/logo.png"></span>
|
96
|
+
|
97
|
+
</a>
|
98
|
+
|
99
|
+
<div id="nav-toggle">
|
100
|
+
|
101
|
+
<div>
|
102
|
+
|
103
|
+
<span></span>
|
104
|
+
|
105
|
+
<span></span>
|
106
|
+
|
107
|
+
<span></span>
|
108
|
+
|
109
|
+
<p class="mobile">メニュー</p>
|
110
|
+
|
111
|
+
</div>
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
<nav id="global-nav">
|
118
|
+
|
119
|
+
<div class="menu-test-container">
|
120
|
+
|
121
|
+
<ul id="menu-test" class="menu">
|
122
|
+
|
123
|
+
<li id="menu-item-426" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-426"><a href="//yzan.jp/#blog">Yzanブログ<span class="gf"></span></a></li>
|
124
|
+
|
125
|
+
<li id="menu-item-651" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-651"><a href="//yzan.jp/#philosophy">Yzanの理念<span class="gf"></span></a></li>
|
126
|
+
|
127
|
+
<li id="menu-item-652" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-652"><a href="//yzan.jp/#business">ビジネス<span class="gf"></span></a></li>
|
128
|
+
|
129
|
+
<li id="menu-item-653" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-653"><a href="//yzan.jp/#people">Yzanと人<span class="gf"></span></a></li>
|
130
|
+
|
131
|
+
<li id="menu-item-4698" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-4698"><a href="https://yzan.jp/djyzan">DJわいざん official<span class="gf"></span></a></li>
|
132
|
+
|
133
|
+
<li id="menu-item-4699" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-4699"><a href="https://yzan.jp/archives/category/popular_articles">人気記事<span class="gf"></span></a></li>
|
134
|
+
|
135
|
+
<div class="mobile nav_search">
|
136
|
+
|
137
|
+
<form role="search" method="get" id="searchform" class="searchform cf" action="https://yzan.jp/" >
|
138
|
+
|
139
|
+
<input type="search" placeholder="検索する" value="" name="s" id="s" />
|
140
|
+
|
141
|
+
<button type="submit" id="searchsubmit" ><i class="fa fa-search"></i></button>
|
142
|
+
|
143
|
+
</form>
|
144
|
+
|
145
|
+
</div>
|
146
|
+
|
147
|
+
</ul>
|
148
|
+
|
149
|
+
</div>
|
150
|
+
|
151
|
+
</nav>
|
152
|
+
|
153
|
+
</div>
|
154
|
+
|
155
|
+
</header>
|
156
|
+
|
157
|
+
```
|