回答編集履歴
1
文言追加
answer
CHANGED
@@ -34,6 +34,7 @@
|
|
34
34
|
// .hogeの中の.hoge2へアクセスし、hrefの値を取得
|
35
35
|
link = $(this).parents('.hoge').find('.hoge2').attr('href');
|
36
36
|
console.log('link: ', link);
|
37
|
+
// linkの値が取得できていれば、リンク先に遷移させる
|
37
38
|
if (link !== undefined) {
|
38
39
|
window.location.href = link;
|
39
40
|
}
|