light dom move or transformation plug-in
By npm:
npm install sherry-move
arguments | Description | defaultvalue | type |
---|---|---|---|
dom | target dom | - | object |
json | information of this transform,like{ 'width' : '200', 'height' : '150' , 'speed' : '6'} | - | json |
callback | callback | null | function |
<script src="/node_modules/sherry-move/dist/sherryMove.js"></script>
other js field you can write:
<script>
startMove(dom, {"width": "300"}, callback)
</script>
import startMove from "sherry-move";
...
startMove(dom, {"width": "300"}, callback)
- startMove's returned value is the dom moved.
- json.speed belong to1-10 (more bigger more slower)