Skip to content

Instantly share code, notes, and snippets.

@preist
Created June 28, 2018 20:02
Show Gist options
  • Select an option

  • Save preist/7dad69a07feac0be162ee46e58e2d0d0 to your computer and use it in GitHub Desktop.

Select an option

Save preist/7dad69a07feac0be162ee46e58e2d0d0 to your computer and use it in GitHub Desktop.

Revisions

  1. preist created this gist Jun 28, 2018.
    3 changes: 3 additions & 0 deletions data-href.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    $(document).on("click", "[data-href]", function(e) {
    return location.href = $(this).attr('data-href');
    });