Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Knockout.js binding to SortableJS.

NotificationsYou must be signed in to change notification settings

SortableJS/knockout-sortablejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


knockout-sortablejs

A Knockout.js binding toSortableJS.

Demo:http://rubaxa.github.io/Sortable/

Support KnockoutJS

Includeknockout-sortable.js

<divdata-bind="sortable: {foreach: yourObservableArray, options: {/* sortable options here */}}"><!-- optional item template here --></div><divdata-bind="draggable: {foreach: yourObservableArray, options: {/* sortable options here */}}"><!-- optional item template here --></div>

Using this bindingHandler sorts the observableArray when the user sorts the HTMLElements.

The sortable/draggable bindingHandlers supports the same syntax as Knockouts built intemplate binding except for thedata option, meaning that you could supply the name of a template or specify a separate templateEngine. The difference between the sortable and draggable handlers is that the draggable has the sortablegroup option set to{pull:'clone',put: false} and thesort option set to false by default (overridable).

Other attributes are:

  • options: an object that contains settings for the underlaying sortable, iegroup,handle, events etc.
  • collection: if yourforeach array is a computed then you would supply the underlaying observableArray that you would like to sort here.
  • manuallyHandleUpdateEvents: a boolean to turn off the change events on update that other polymer elements listen to.

NPM

npm install knockout-sortablejs

About

A Knockout.js binding to SortableJS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp