Created
August 22, 2013 17:28
-
-
Save dviramontes/6310261 to your computer and use it in GitHub Desktop.
makes anything with class .clickable, clickable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".clickable").click(function(event) { | |
event.preventDefault(); | |
if ($(this).data().href) { | |
return window.open($(this).data().href, "_self"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment