質問編集履歴
2
javascriptの編集
test
CHANGED
File without changes
|
test
CHANGED
@@ -52,11 +52,11 @@
|
|
52
52
|
|
53
53
|
```javascript
|
54
54
|
|
55
|
-
var biggestWidth = $(".
|
55
|
+
var biggestWidth = $(".area").width();
|
56
56
|
|
57
57
|
var array1 = [];
|
58
58
|
|
59
|
-
$('.
|
59
|
+
$('.contents').each(function(i){
|
60
60
|
|
61
61
|
var boxWidth = $(this).width() + (i + 1);
|
62
62
|
|
1
javascriptの編集
test
CHANGED
File without changes
|
test
CHANGED
@@ -52,30 +52,32 @@
|
|
52
52
|
|
53
53
|
```javascript
|
54
54
|
|
55
|
-
$(
|
55
|
+
var biggestWidth = $(".sec__bg").width();
|
56
56
|
|
57
|
-
|
57
|
+
var array1 = [];
|
58
58
|
|
59
|
-
|
59
|
+
$('.box').each(function(i){
|
60
60
|
|
61
|
-
|
61
|
+
var boxWidth = $(this).width() + (i + 1);
|
62
62
|
|
63
|
-
|
63
|
+
array1.push(boxWidth);
|
64
64
|
|
65
|
-
|
65
|
+
});
|
66
66
|
|
67
|
-
|
67
|
+
console.log(array1);
|
68
68
|
|
69
|
-
});
|
70
69
|
|
71
|
-
$(".area").each(function(){
|
72
70
|
|
73
|
-
|
71
|
+
$.each(array1, function(index, elem){
|
74
72
|
|
75
|
-
|
73
|
+
if(elem > biggestWidth){
|
76
74
|
|
77
|
-
|
75
|
+
biggestWidth = elem;
|
78
76
|
|
77
|
+
}
|
78
|
+
|
79
|
+
console.log(biggestWidth);
|
80
|
+
|
79
|
-
|
81
|
+
});
|
80
82
|
|
81
83
|
```
|