Skip to content

tellnes/hammer-sortables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hammer-sortable

This is an extension for Hammer.js which implements sortable lists.

It depends on hammer-draggables.

Usage

var options =
  { handle: '.move'
  , draggable: 'li'
  , axis: 'y'
  }

var sortable = new Sortable($('ul'), options)
sortable.on('start', function (event, dragging) {
  dragging.element.classList.add('dragging')
})
sortable.on('end', function (event, dragging) {
  dragging.element.classList.remove('dragging')
})
sortable.on('change', function (dragging, moved) {
  // position changed
})

Install

$ npm install hammer-sortable

$ bower install https://github.com/tellnes/hammer-sortables.git

License

MIT

About

Sortable extension for Hammer.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published