Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/422.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Jquery可排序。调整选定/拖动的CSS_Javascript_Jquery_Html_Css_Jquery Ui Sortable - Fatal编程技术网

Javascript Jquery可排序。调整选定/拖动的CSS

Javascript Jquery可排序。调整选定/拖动的CSS,javascript,jquery,html,css,jquery-ui-sortable,Javascript,Jquery,Html,Css,Jquery Ui Sortable,使用jquerysortable。我想做一个简单的css切换功能,这样我就可以更改我选择的字段的背景颜色(查看中的事件start和stop。通过使用它们,您只需在当前拖动的元素中添加或删除所需的类。通过 $(ui.item).doStuff(); 其中,ui当然是事件回调参数的第二个 $(document).ready(function () { $("#reorder-list").sortable({ placeholder: "destination",

使用jquerysortable。我想做一个简单的css切换功能,这样我就可以更改我选择的字段的背景颜色(
查看中的事件
start
stop
。通过使用它们,您只需在当前拖动的元素中添加或删除所需的类。通过

$(ui.item).doStuff();
其中,
ui
当然是事件回调参数的第二个

$(document).ready(function () {
    $("#reorder-list").sortable({
        placeholder: "destination",
        forcePlaceholderSize: true,
        handle: '.handle',
        update: function () {
            var order = $('#reorder-list').sortable('serialize');
            $("#info").load("billboard-sort.php?" + order);
        }
    });
});
.bar-across {
    background:#fff;
    border:1px solid #ccc;
    margin-bottom:5px;
    width: 100%;
}
#reorder-list div .handle {
    cursor: move;
    padding:0;
    float:left;
    background:#0C6;
    padding: 10px;
}
.destination {
    background:#1c5dbb;
    width: inherited;
}
.selected {
    background:#FF0;
}
/* Clearfix
    ============================================================================ */

/* Clearfix */
 .CF:after {
    content:".";
    display:block;
    height:0;
    clear:both;
    visibility:hidden;
}
.CF {
    display:inline-block;
}
$(ui.item).doStuff();