我正在阅读此代码(http://jqueryui.com/droppable/#photo-manager),但无法理解某一特定行
var $gallery = $( "#gallery" ),
$trash = $( "#trash" );
$( "li", $gallery ).draggable({ //This is the line a I can't understand well
cancel: "a.ui-icon",
revert: "invalid",
containment: "document",
helper: "clone",
cursor: "move"
});
为什么 $gallery 在那里?它没有使 $gallery 可拖动,只是<li>
可拖动。
似乎只能拖动<li>
内部#gallery
,但这很容易完成$("#gallery li")
or$("#gallery > li")
那么有什么不同呢?