Home >Web Front-end >JS Tutorial >jsTree sorting node based on JQuery Bug_jquery

jsTree sorting node based on JQuery Bug_jquery

WBOY
WBOYOriginal
2016-05-16 18:04:251087browse

For example:

- a (position 1)
- b (position 2)
- c (position 3)
move c between a and b: cp=1
move a between b and c: cp=2
The downward shift position adds 1 more. I’m not sure why. Here is a fix. Maybe it’s not very good.

Replace

"position" : data.rslt.cp i,

with

"position" : data.rslt.o.index( ) i,
may be helpful to you

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn