You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a small error in it that if ctx is undefined it does nothing.
if( el && ctx){
really should be...
if( el ){
...since your defining ctx on the next line anyway.
Also, if you care about speed how about using matches/matchSelector, its alot faster..... http://jsperf.com/closestagain
...and according to caniuse available in all modern browser except Opera Mini.
Oh, and thanks for making this, Ive looked a few times for something like this that doesnt use JQuery and this is the first thing thats ever popped up....well done.
EDIT: Actually I take the speed thing back as I just tested it in FF and yours won. I have a bad habit of only testing in Chrome because its the only browser I code for.
Activity
#4: fixed _closest method
RubaXa commentedon Dec 25, 2013
I have not tested the speed, laziness ;]
Merge pull request #4 from RubaXa/dev
OrderList fix SortableJS#4