Skip to content

Instantly share code, notes, and snippets.

@dannyockilson
Last active August 29, 2015 14:17
Show Gist options
  • Save dannyockilson/26939d683d24356dfd7c to your computer and use it in GitHub Desktop.
Save dannyockilson/26939d683d24356dfd7c to your computer and use it in GitHub Desktop.
Quick Snippet
// Used Chrome dev tools to find the click event being triggered
$("article.lesson-block").find(".full-center").on("click", function(event) {
// check for ctrl or metakey (mac cmd)
if (!event.ctrlKey && !event.metaKey) {
// if not do your stuff
var t = $(this).parents(".lesson-block").find(".lesson-block-title a").attr("href");
location = t
}
})
@dannyockilson
Copy link
Author

Ooops put the logic the wrong way round :\ and forgot to pass in the event... better now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment