回答編集履歴
3
調整
test
CHANGED
@@ -78,7 +78,7 @@
|
|
78
78
|
|
79
79
|
$('<li>').addClass('colorList__item').append(
|
80
80
|
|
81
|
-
$('<p>').addClass('colorList__title').css('background
|
81
|
+
$('<p>').addClass('colorList__title').css('backgroundColor',$(this).get(0).hexValue).html($(this).get(0).colorName)
|
82
82
|
|
83
83
|
)
|
84
84
|
|
@@ -91,3 +91,9 @@
|
|
91
91
|
});
|
92
92
|
|
93
93
|
```
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
修正:
|
98
|
+
|
99
|
+
jQuery3系はbackground-Colorは指定できないbackgroundColorとする
|
2
調整
test
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
}).done(function(data) {
|
20
20
|
|
21
|
-
data.colorsArray.forEach(function(
|
21
|
+
data.colorsArray.forEach(function(){
|
22
22
|
|
23
23
|
$(".colorList").append(
|
24
24
|
|
1
調整
test
CHANGED
@@ -47,3 +47,47 @@
|
|
47
47
|
</div>
|
48
48
|
|
49
49
|
```
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
# 調整
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
ああ、はいはい条件ね・・・
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
```javascript
|
62
|
+
|
63
|
+
$(function(){
|
64
|
+
|
65
|
+
$.ajax({
|
66
|
+
|
67
|
+
url: './data.json',
|
68
|
+
|
69
|
+
type: "GET",
|
70
|
+
|
71
|
+
dataType: "json",
|
72
|
+
|
73
|
+
}).done(function(data) {
|
74
|
+
|
75
|
+
$.each(data.colorsArray,function(x){
|
76
|
+
|
77
|
+
$(".colorList").append(
|
78
|
+
|
79
|
+
$('<li>').addClass('colorList__item').append(
|
80
|
+
|
81
|
+
$('<p>').addClass('colorList__title').css('background-Color',$(this).get(0).hexValue).html($(this).get(0).colorName)
|
82
|
+
|
83
|
+
)
|
84
|
+
|
85
|
+
)
|
86
|
+
|
87
|
+
});
|
88
|
+
|
89
|
+
});
|
90
|
+
|
91
|
+
});
|
92
|
+
|
93
|
+
```
|