質問編集履歴
2
しゅうせい
title
CHANGED
File without changes
|
body
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
//javascript(jQuery)
|
16
16
|
$('.foo ').click(function() {
|
17
|
-
const i = $('foo input').data('id')
|
17
|
+
const i = $('.foo input').data('id')
|
18
18
|
console.log(i)
|
19
19
|
})
|
20
20
|
|
1
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
//html
|
3
3
|
<div>
|
4
4
|
<div class="foo">
|
5
|
-
<input data="a">
|
5
|
+
<input data-id="a">
|
6
6
|
</div>
|
7
7
|
<div class="foo">
|
8
|
-
<input data="b">
|
8
|
+
<input data-id="b">
|
9
9
|
</div>
|
10
10
|
<div class="foo">
|
11
|
-
<input data="c">
|
11
|
+
<input data-id="c">
|
12
12
|
</div>
|
13
13
|
</div>
|
14
14
|
|