Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

SORTING

A group of sortable elements are reorderable drag/drop components; for example, a list, a grid of elements, or even sorting an interconnected set of elements. Table 9-4 shows the different methods available for sortable elements.

TABLE 9.4: $.sortable() Methods

METHOD DESCRIPTION
$(selector).sortable(); Makes selected element sortable.
$(selector). sortable (“destroy”); Removes the sortable functionality completely. This option rolls the selected element back to its initial state.
$(selector). sortable (“disable”); Disables the sortable element.
$(selector). sortable (“enable”) Enables the sortable element.
$(selector). sortable (“option”, optionName, “value”); Gets or sets any sortable element option. If the third argument is omitted, acts as a getter. Otherwise, it sets the optionName with the provided value.

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial