Skip to content

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

Notifications You must be signed in to change notification settings

wicked-knife/Thanos-fingersnap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published