JSFiddle - React, Tailwind, and code Playground

by rwaldron

JavaScript

$.each(["unload", "unload click"], function( i, type ) {
    
  $(window).bind( type, function( event ) {
    console.log(
        "Triggered: ", event.type, " from the binding of ", type
    );
        
  });
    
});

$(window).trigger("unload");