1.0.13 • Published 5 years ago

thanos-fingersnap v1.0.13

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

thanos-fingersnap

Disappear the part of your website that which you want, just like Thanos snap his finger with infinity glove.

demo

Installation

In a browser:

<script src="Thanos-fingersnap.js"></script>

Using npm:

npm install thanos-fingersnap --save

Options

Options is very simple.

  • el (String or Element) The element that you want it to disappear.
  • count (Number) the canvas element will generate. By default is 10, and modifying this option may affect performance.

Usage example

Usage is also very easy.

  var thanos = new Thanos({
    el: '#container'
  })

  // when you want to destroy the element,
  // call the `snap` method

  thanos.snap()

  // when you want to restore the element,
  // call the `restore` method

  thanos.restore()

Attention

If the element contains <img>, the image source must be Same-origin or the image source allow cross-origin.

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago