10/14 Sortable and Selectable


Would anyone know how to make this exercise both sortable and selectable?

I tried this $('ol').selectable().sortable(); without success.


Hi Mark,

A quick search finds a couple helpful results, this one looks particularly helpful although I haven't tried it.
Apparently you need to give an element a certain class when it's being selected, then not sort it if it has that class, to avoid conflict between the two functions.


Thanks. I did look online but all the solutions I found seemed overly complicated. The solution you've provided me also has a lot of lines of code. I was kind of hoping to find something simpler. Doesn't it even exist? Thanks for your help!


Apparently not :confused:
If you ever find a simple method for doing both though, would you mind letting me know? I'd be interested in knowing how to do both at the same time :)

And I'm sorry I haven't replied sooner - this tab got buried behind a bunch of other tabs, along with a couple other questions. I'm going to try to answer your other two questions tonight or early tomorrow :)


I will let definitely let you know if I find something.
No worries, man. Thanks.