回答編集履歴
1
チョウセイ
answer
CHANGED
@@ -6,4 +6,19 @@
|
|
6
6
|
↓↓↓
|
7
7
|
<?php echo ($i+1); ?>
|
8
8
|
```
|
9
|
-
ではダメですか?
|
9
|
+
ではダメですか?
|
10
|
+
|
11
|
+
# sample
|
12
|
+
```javascript
|
13
|
+
<script>
|
14
|
+
$(function(){
|
15
|
+
$('[id^=like_result]').map(function(){
|
16
|
+
return parseInt($(this).attr('id').replace(/^like_result/g,''));
|
17
|
+
}).get().sort((x,y)=>-x+y).forEach(x=>$('#like_result'+x).attr('id','like_result'+(x+1).toString()));
|
18
|
+
});
|
19
|
+
</script>
|
20
|
+
|
21
|
+
<p id="like_result9">test9</p>
|
22
|
+
<p id="like_result10">test10</p>
|
23
|
+
<p id="like_result11">test11</p>
|
24
|
+
```
|