Skip to content

evandroeisinger/mossa.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mossa.js npm version

An Italian library to move elements 🇮🇹

install

Available on npm: npm install mossa or directly download

basic usage

Just create a new instance of mossa.js for each element you want to move.

<article>
  <h1>mossa.js</h1>
  <p>Lorem ipsum dolizzle sit amizzle, i saw beyonces tizzles and my pizzle went crizzle adipiscing my shizz. Ghetto sapien velizzle, aliquet volutpizzle, fizzle quizzle, pimpin' vel, arcu. Pellentesque gangsta tortor.</p>
  <figure>
    <img src="example.jpg">
  </figure>
</article>
new Mossa(document.getElementsByTagName('figure')[0], {
  onStartMoving: function(element, thumbnail) {
    console.log('onStartMoving: ', element, thumbnail);
  },
  onDrop: function(element) {
    console.log('onDrop: ', element);
  }
});

constructor

new Mossa(DOMElement, options);
parameters
  • DOMElement: the element that will be used for Mossa.js instantiation
  • options
    • onStartMoving(element, thumbnail): callback called when the element start moving
    • onDrop(element): callback called when the element has been dropped

support

  • chrome: latest
  • firefox: latest
  • safari: latest
  • internet explore: ?

contribute

Everyone can contribute! Finding bugs, creating issues, improving documentation, improving editor it self or creating components. Every contribution will be welcomed! 🎅

Fork it -> Branch it -> Test it -> Push it -> Pull Request it 💎