回答編集履歴
1
調整
test
CHANGED
@@ -83,3 +83,29 @@
|
|
83
83
|
</div>
|
84
84
|
|
85
85
|
```
|
86
|
+
|
87
|
+
あとは一発でやるならこうとか
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
```javascript
|
92
|
+
|
93
|
+
$(function(){
|
94
|
+
|
95
|
+
$('li').on('click',function(){
|
96
|
+
|
97
|
+
var ani=$(this).closest('div').find('li:lt('+$(this).closest('div').find('li').index(this)+')').map(function(){
|
98
|
+
|
99
|
+
return $(this).text();
|
100
|
+
|
101
|
+
}).get();
|
102
|
+
|
103
|
+
console.log(ani);
|
104
|
+
|
105
|
+
});
|
106
|
+
|
107
|
+
});
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
```
|