質問編集履歴
2
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -102,13 +102,11 @@
|
|
102
102
|
|
103
103
|
$(function() {
|
104
104
|
|
105
|
-
|
106
|
-
|
107
105
|
$('#unList li').on('click',function(){
|
108
106
|
|
109
|
-
$(this).
|
107
|
+
$(this).remove();
|
110
108
|
|
111
|
-
$(t
|
109
|
+
$('#sortable').append($(this).clone().addClass("ui-sortable-handle"));
|
112
110
|
|
113
111
|
});
|
114
112
|
|
@@ -116,9 +114,11 @@
|
|
116
114
|
|
117
115
|
$("#sortable li").on('click',function(){
|
118
116
|
|
119
|
-
$(this).
|
117
|
+
$(this).remove();
|
120
118
|
|
121
|
-
$(this).appendTo('#unList');
|
119
|
+
//$(this).appendTo('#unList');
|
120
|
+
|
121
|
+
$('#unList').append($(this).clone().removeClass("ui-sortable-handle"));
|
122
122
|
|
123
123
|
});
|
124
124
|
|
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -89,3 +89,39 @@
|
|
89
89
|
});
|
90
90
|
|
91
91
|
```
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
###追記
|
96
|
+
|
97
|
+
以下のようなコードにして試してみました。
|
98
|
+
|
99
|
+
要素は非表示になるのですが、``#sortable``に要素が追加されません。
|
100
|
+
|
101
|
+
```javascript
|
102
|
+
|
103
|
+
$(function() {
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
$('#unList li').on('click',function(){
|
108
|
+
|
109
|
+
$(this).hide();
|
110
|
+
|
111
|
+
$(this).appendTo('#sortable');
|
112
|
+
|
113
|
+
});
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
$("#sortable li").on('click',function(){
|
118
|
+
|
119
|
+
$(this).hide();
|
120
|
+
|
121
|
+
$(this).appendTo('#unList');
|
122
|
+
|
123
|
+
});
|
124
|
+
|
125
|
+
});
|
126
|
+
|
127
|
+
```
|