Gator.js a micro event handling framework

I’ve had a look at gator.js, it’s useful because it’s very a lightweight way of handling events on page elements. Quick demo below:

<!DOCTYPE html>
<html lang="en">
    <title>Gator demo</title>
      <script type="text/javascript" src="gator.min.js"></script>
     <table id="mytable">
    <script type="text/javascript">
        var table = document.getElementById("mytable");
        Gator(table).on('click', 'tr', function (e) {
            alert("clicked on table row");

Leave a Reply

Your email address will not be published. Required fields are marked *