Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : What is the best way to reorderng items in DOM?

$
0
0
http://jsfiddle.net/GE3yf/35/  

This is the approach I've taken, and extended to solve similar "listing" problems (user-selectable sort, reverse sorting, pagination, deferred state changes). Another benefit is it works closer to the CanJS declarative/data-binding approach - don't have to call sort() or sortPosition() each time the order might change.

Doesn't make use of the can.map.sort plugin - which is too buggy and reliant on internal stuff to get working again easily IMHO, and I have tried (issue #1114)

While its not going to be as efficient, it works well and reliably enough that I can build on top of it to solve bigger problems.


Viewing all articles
Browse latest Browse all 3491

Trending Articles