Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save andreescocard/3448c39543bf4da772d11f6eaf7095ec to your computer and use it in GitHub Desktop.
Save andreescocard/3448c39543bf4da772d11f6eaf7095ec to your computer and use it in GitHub Desktop.

Revisions

  1. Anton Trofimenko created this gist Nov 15, 2012.
    6 changes: 6 additions & 0 deletions dataset from event.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    // as property
    event.currentTarget.dataset.id
    // as array element
    event.currentTarget.dataset['id']
    // jquery method
    $(event.currentTarget).data('id')