Skip to content

Instantly share code, notes, and snippets.

@full-of-foo
Created May 24, 2017 10:48
Show Gist options
  • Save full-of-foo/de653c55bef6da82d99bc207430e9df7 to your computer and use it in GitHub Desktop.
Save full-of-foo/de653c55bef6da82d99bc207430e9df7 to your computer and use it in GitHub Desktop.

app.js

$(function() {
    console.log('In app.js'); // TODO - remove later

    $('.icon-trash').click(function() {
        console.log('Clicked delete for row: ', this); // TODO - remove later

       // TODO - lets explore making the XHR request later
    });
});

index.html

<html>
  <head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script src="assets/js/app.js"></script>
  </head>
  <body>
    <table>
      <tr>
        <td>My data</td>
        <td><i id="{{uuidOfData}}" class="icon icon-trash"></i></td>
      </tr>
    </table>
  </body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment