Skip to content

Instantly share code, notes, and snippets.

@joelrbrandt
Created March 30, 2013 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joelrbrandt/5277070 to your computer and use it in GitHub Desktop.
Save joelrbrandt/5277070 to your computer and use it in GitHub Desktop.
Simple jquery event, for testing debugger events
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
function sayHi() {
console.log("hi");
}
$(function () {
$("h1").on("mousedown", sayHi);
$("h1").css("color", "red");
});
</script>
</head>
<body>
<h1>Hi there!</h1>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment