回答編集履歴
2
調整
answer
CHANGED
@@ -31,7 +31,7 @@
|
|
31
31
|
$(function(){
|
32
32
|
const mmss="x";
|
33
33
|
const comment="y";
|
34
|
-
const item=["a","b","c"];
|
34
|
+
const item=["a","b",null,"c"];
|
35
35
|
item.forEach((i,j)=> {
|
36
36
|
const targetDiv2 = $(".ytp-tooltip");
|
37
37
|
const commentDiv = $(
|
1
ちょうせい
answer
CHANGED
@@ -22,4 +22,29 @@
|
|
22
22
|
</script>
|
23
23
|
<div class="ytp-tooltip"></div>
|
24
24
|
|
25
|
+
```
|
26
|
+
|
27
|
+
# debug
|
28
|
+
|
29
|
+
```javascript
|
30
|
+
<script>
|
31
|
+
$(function(){
|
32
|
+
const mmss="x";
|
33
|
+
const comment="y";
|
34
|
+
const item=["a","b","c"];
|
35
|
+
item.forEach((i,j)=> {
|
36
|
+
const targetDiv2 = $(".ytp-tooltip");
|
37
|
+
const commentDiv = $(
|
38
|
+
`<div class="ytp-tooltip-text-wrapper22" value=${mmss} style="position: absolute; bottom: 100px;background-color: rgba(28,28,28,0.9); display: none">${comment}<span style="display:none">${j}</span></div>`
|
39
|
+
);
|
40
|
+
try {
|
41
|
+
targetDiv2.append(commentDiv);
|
42
|
+
console.log("appendした", commentDiv, targetDiv2);
|
43
|
+
} catch (err) {
|
44
|
+
console.log("err", err);
|
45
|
+
}
|
46
|
+
});
|
47
|
+
});
|
48
|
+
</script>
|
49
|
+
<div class="ytp-tooltip"></div>
|
25
50
|
```
|