Disintegrate GitHub

"to reduce to particles, fragments, or parts; break up or destroy the cohesion of"

Simultaneous demo - view source

Relevant code:

<data-dis-type="simultaneous">
  Click me
</button>
disintegrate.init();

if(document.querySelector('[data-dis-type="simultaneous"]')) {
  window.addEventListener("disesLoaded", function() {
    disintegrate.dises.forEach(function(disObj) {
      if(disObj.elem.dataset.disType === "simultaneous") {
        disObj.elem.addEventListener("click", function(e) {
          disintegrate.createSimultaneousParticles(disObj);
        });
      }
    });
  });
}

View more demos