如何运行接收方法可排序
在此标准示例中 http://jqueryui.com/demos/sortable/#connect-lists-through -tabs
<script>
$(function() {
$( "#sortable1, #sortable2" ).sortable().disableSelection();
var $tabs = $( "#tabs" ).tabs();
var $tab_items = $( "ul:first li", $tabs ).droppable({
accept: ".connectedSortable li",
hoverClass: "ui-state-hover",
drop: function( event, ui ) {
var $item = $( this );
var $list = $( $item.find( "a" ).attr( "href" ) )
.find( ".connectedSortable" );
ui.draggable.hide( "slow", function() {
$tabs.tabs( "select", $tab_items.index( $item ) );
$( this ).appendTo( $list ).show( "slow" );
});
}
});
});
</script>
当您添加到拳头列表时如何运行接收方法,以便我添加到数据库并在您返回时删除
In this standard example
http://jqueryui.com/demos/sortable/#connect-lists-through-tabs
<script>
$(function() {
$( "#sortable1, #sortable2" ).sortable().disableSelection();
var $tabs = $( "#tabs" ).tabs();
var $tab_items = $( "ul:first li", $tabs ).droppable({
accept: ".connectedSortable li",
hoverClass: "ui-state-hover",
drop: function( event, ui ) {
var $item = $( this );
var $list = $( $item.find( "a" ).attr( "href" ) )
.find( ".connectedSortable" );
ui.draggable.hide( "slow", function() {
$tabs.tabs( "select", $tab_items.index( $item ) );
$( this ).appendTo( $list ).show( "slow" );
});
}
});
});
</script>
When you adding to fist list how run receive method so I add to database and remove when you moving back
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这取决于您的后端编码。例如,如果您使用 php,您可能想使用 jQuery 进行 AJAX 调用:
然后,如果您的 PHP 文件,您可以放置类似这样的内容:
类似的内容。希望它有帮助:)
This depends on what your backend is coded in. For instance, if you are using php, you may want to use jQuery to make an AJAX call:
Then, if your PHP file, you put something like this:
Something like that. Hope it helps :)