I am using Ruby on Rails v3.2.2 and the jquery-rails v2.0.2 gems (including jQuery UI). In a my view I have implemented a “basic” / “simple” jQuery UI Sortable Interaction and I would like to constrain users to sort only a given element in the list. That is, for example, if I have the following sortable list:
- Item 1
- Item 2
- Item 3
- Item …
I would make only the Item 3 to be sortable and the others to be not. Is it possible?
You can use the
handleoption. With HTML like:You can set the sortable properties thus: