Skip to content

tinusg/hammer-sortables

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hammer-sortable

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

It depens on hammer-dragables.

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

License

MIT

About

Sortable extension for Hammer.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published