質問するログイン新規登録

回答編集履歴

2

LeftButtonClick追加

2017/05/29 12:01

投稿

h_daido
h_daido

スコア824

answer CHANGED
@@ -2,8 +2,14 @@
2
2
  でしたら、
3
3
  ```
4
4
  function RightButtonClick(){
5
- $('.wibthList').prepend($('.wibthList img').last())
5
+ $('.wibthList').prepend($('.wibthList img').last())
6
6
  }
7
+
8
+ function LeftButtonClick(){
9
+ $('.wibthList').append($('.wibthList img').first())
10
+ }
7
11
  ```
8
12
 
9
- でどうでしょう?
13
+ でどうでしょう?
14
+
15
+ removeで削除するのではなく、domを移動させてあげるというかんじです。

1

prependとbefore間違えた

2017/05/29 12:01

投稿

h_daido
h_daido

スコア824

answer CHANGED
@@ -1,7 +1,9 @@
1
1
  jQuery入ってるんですよね?
2
2
  でしたら、
3
3
  ```
4
+ function RightButtonClick(){
4
- $('.wibthList').before($('.wibthList img').last())
5
+ $('.wibthList').prepend($('.wibthList img').last())
6
+ }
5
7
  ```
6
8
 
7
9
  でどうでしょう?