Code Monkey home page Code Monkey logo

mossa.js's Introduction

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 ๐Ÿ’Ž

mossa.js's People

Contributors

evandroeisinger avatar

Stargazers

Evandro Ribeiro avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.