回答編集履歴

1

削除もするよ。

2018/04/19 07:23

投稿

m.ts10806
m.ts10806

スコア80850

test CHANGED
@@ -8,13 +8,15 @@
8
8
 
9
9
  divNum = $(this).children("img").attr("src").replace(/[^0-9^]/g,""); //数字以外を置換
10
10
 
11
+ $(this).children("img").remove();
12
+
11
13
  var imgDiv = $("<div></div>",{
12
14
 
13
15
  addClass:"rank"+divNum,
14
16
 
15
17
  });
16
18
 
17
- $(this).html(imgDiv);
19
+ $(this).append(imgDiv);
18
20
 
19
21
  });
20
22