質問編集履歴
2
タイトルが間違っていたので編集します。
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
target="blank"が聞かない
|
1
|
+
target="_blank"が聞かない
|
test
CHANGED
File without changes
|
1
気づいた点を追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -31,3 +31,239 @@
|
|
31
31
|
非常に大きなページなのですが、
|
32
32
|
|
33
33
|
もしわかる方がいればご助言お願いいたします。
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
--追加--
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
おそらく下記のコードが怪しいのではないかと気づいたので追記します。
|
42
|
+
|
43
|
+
https://www.jetro.go.jp/library/new/common/asset_js/180305/jquery.common.js
|
44
|
+
|
45
|
+
内の記述です。
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
```js
|
50
|
+
|
51
|
+
//-----------------------------------------------------
|
52
|
+
|
53
|
+
// -tab_changer
|
54
|
+
|
55
|
+
//-----------------------------------------------------
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
var tab_changer = (function (window, document, $) {
|
60
|
+
|
61
|
+
var elem = {};
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
function init(){
|
66
|
+
|
67
|
+
elem = $('.checkTab');
|
68
|
+
|
69
|
+
elem.each(function(){
|
70
|
+
|
71
|
+
var _this = $(this);
|
72
|
+
|
73
|
+
_this.find('.tabBox').hide();
|
74
|
+
|
75
|
+
_this.find('.tabBox').eq(0).show();
|
76
|
+
|
77
|
+
if ( _this.find('.tabNav').is('.var_link') ) {
|
78
|
+
|
79
|
+
} else {
|
80
|
+
|
81
|
+
_this.find('.tabNav li:eq(0)').addClass('on');
|
82
|
+
|
83
|
+
_this.find('.tabNav li').each(function(){
|
84
|
+
|
85
|
+
$("a", this).attr("aria-selected", $(this).is(".on")).attr("tabindex", ($(this).is(".on")) ? 0 : -1);
|
86
|
+
|
87
|
+
});
|
88
|
+
|
89
|
+
}
|
90
|
+
|
91
|
+
var _title_number = _this.find('.tabNav li').length;
|
92
|
+
|
93
|
+
_this.find('.tabNav li').css({
|
94
|
+
|
95
|
+
'box-sizing': 'border-box',
|
96
|
+
|
97
|
+
'width': 100/_title_number +'%'
|
98
|
+
|
99
|
+
});
|
100
|
+
|
101
|
+
});
|
102
|
+
|
103
|
+
tab_changer.click();
|
104
|
+
|
105
|
+
}
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
function click(){
|
110
|
+
|
111
|
+
elem.find('.tabNav li').on('click',function(e){
|
112
|
+
|
113
|
+
var _this = $(this);
|
114
|
+
|
115
|
+
if ( _this.closest('.tabNav').is('.var_link') ) {
|
116
|
+
|
117
|
+
} else {
|
118
|
+
|
119
|
+
var _this_parent = _this.closest('.checkTab');
|
120
|
+
|
121
|
+
var _click_number = _this.index();
|
122
|
+
|
123
|
+
_this_parent.find('.tabBox').hide();
|
124
|
+
|
125
|
+
_this_parent.find('.tabBox').eq(_click_number).fadeIn('slow');
|
126
|
+
|
127
|
+
_this_parent.find('.tabNav li.on').removeClass('on').find(".hosoku").remove();
|
128
|
+
|
129
|
+
_this_parent.find('.tabNav li').eq(_click_number).addClass('on');
|
130
|
+
|
131
|
+
_this_parent.find('.tabNav li').each(function(){
|
132
|
+
|
133
|
+
$("a", this).attr("aria-selected", $(this).is(".on")).attr("tabindex", ($(this).is(".on")) ? 0 : -1);
|
134
|
+
|
135
|
+
});
|
136
|
+
|
137
|
+
return false;
|
138
|
+
|
139
|
+
}
|
140
|
+
|
141
|
+
});
|
142
|
+
|
143
|
+
elem.find('.tabNav li a').on('keyup',function(e){
|
144
|
+
|
145
|
+
var _this = $(this);
|
146
|
+
|
147
|
+
if ( _this.closest('.tabNav').is('.var_link') ) {
|
148
|
+
|
149
|
+
} else {
|
150
|
+
|
151
|
+
switch (e.keyCode) {
|
152
|
+
|
153
|
+
case 37: //left
|
154
|
+
|
155
|
+
_this.parents("li").prev().find("a").click().focus();
|
156
|
+
|
157
|
+
break;
|
158
|
+
|
159
|
+
case 39: //right
|
160
|
+
|
161
|
+
_this.parents("li").next().find("a").click().focus();
|
162
|
+
|
163
|
+
break;
|
164
|
+
|
165
|
+
};
|
166
|
+
|
167
|
+
return false;
|
168
|
+
|
169
|
+
}
|
170
|
+
|
171
|
+
});
|
172
|
+
|
173
|
+
}
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
return {
|
178
|
+
|
179
|
+
elem: elem,
|
180
|
+
|
181
|
+
init: init,
|
182
|
+
|
183
|
+
click: click
|
184
|
+
|
185
|
+
};
|
186
|
+
|
187
|
+
})(window, document, jQuery);
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
$(function(){
|
192
|
+
|
193
|
+
tab_changer.init();
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
$(window).bind('beforeunload', function() {
|
198
|
+
|
199
|
+
$(".tabNav[id]:not(.var_link)").each(function(){
|
200
|
+
|
201
|
+
var date = new Date();
|
202
|
+
|
203
|
+
date.setTime( date.getTime() + ( 120 * 60 * 1000 ));
|
204
|
+
|
205
|
+
$.cookie('tab_'+$(this).attr("id"), $("li", this).index($(".on", this)), { expires: date, path:'/' });
|
206
|
+
|
207
|
+
});
|
208
|
+
|
209
|
+
});
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
$(".tabNav:not(.var_link, [id])").each(function(i){
|
214
|
+
|
215
|
+
$(this).attr("id", "tab"+crc32(location.pathname)+(i));
|
216
|
+
|
217
|
+
});
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
$(".tabNav[id]:not(.var_link)").each(function(){
|
222
|
+
|
223
|
+
var tabon = $.cookie('tab_'+$(this).attr("id"));
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
if ($(this).is($(location.hash.split("_")[0]))) {
|
228
|
+
|
229
|
+
tabon = location.hash.split("_")[1] - 1;
|
230
|
+
|
231
|
+
}
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
if (tabon != null) {
|
236
|
+
|
237
|
+
$("li:eq("+tabon+") a", this).click();
|
238
|
+
|
239
|
+
}
|
240
|
+
|
241
|
+
});
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
$(document).on("click", "a.tabsw[href^='#']", function(){
|
246
|
+
|
247
|
+
var sw = $(this).attr("href");
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
if ($(sw.split("_")[0]).length > 0) {
|
252
|
+
|
253
|
+
var tabon = sw.split("_")[1] - 1
|
254
|
+
|
255
|
+
$("li:eq("+tabon+") a", $(sw.split("_")[0])).click();
|
256
|
+
|
257
|
+
}
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
return false;
|
262
|
+
|
263
|
+
});
|
264
|
+
|
265
|
+
});
|
266
|
+
|
267
|
+
```
|
268
|
+
|
269
|
+
このコードに a.tabsw[href^='#']" という部分があり、ここか?と疑っています。
|