javascript - Problem with TreeGrid node moving up and down in EasyUI
过去多啦不再A梦
过去多啦不再A梦 2017-07-05 10:45:16
0
1
826
//TreeGrid里面实现节点上下移动功能的代码片段

//有点不理解这段代码的意思、求解啊

//主要是不懂 .Prev("") 和 .attr("") 的意思

var _pvid = $("tr[node-id='" + row.Id + "']").prev("tr").attr("node-id");
if (!_pvid) {
    if ($("tr[node-id='" + row.Id + "']").prev("tr").attr("class") == "treegrid-tr-tree") {
        _pvid = $("tr[node-id='" + row.Id + "']").prev("tr").prev("tr").attr("node-id");
    }
}
过去多啦不再A梦
过去多啦不再A梦

reply all(1)
阿神

Prev and attr are both Jquery methods. The method names are abbreviations of words, namely previous and attribute respectively.
The name means: Prev is the adjacent previous node, and attr is the attribute of the JQuery object.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template