Skip to content

Instantly share code, notes, and snippets.

@brianbancroft
Created May 2, 2016 20:33
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 brianbancroft/31c5ea594b4c996baff9d11f0e650018 to your computer and use it in GitHub Desktop.
Save brianbancroft/31c5ea594b4c996baff9d11f0e650018 to your computer and use it in GitHub Desktop.
Mucking with Console.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The HTML5 Herald</title>
<meta name="description" content="The HTML5 Herald">
<meta name="author" content="SitePoint">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<form>
Sample: <input type="text" id="sample" name="fname"><br>
Sample: <input type="text" id="sample2" name="fname"><br>
<input type="submit" value="Submit">
</form>
<script src="https://code.jquery.com/jquery-2.2.3.min.js" integrity="sha256-a23g1Nt4dtEYOj7bR+vTu7+T8VP13humZFBJNIYoEJo=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script>
$( "#sample" ).keyup(function(e) {
console.log(e);
});
$( "#sample" ).keydown(function(e) {
console.log(e);
});
$( "#sample" ).keypress(function(e) {
console.log(e);
});
$( "#sample" ).hover(function(e) {
console.log(e);
});
$( "#sample" ).mouseenter(function(e) {
console.log(e);
});
$( "#sample" ).mouseleave(function(e) {
console.log(e);
});
$( "#sample" ).mousemove(function(e) {
console.log(e);
});
$( "#sample" ).mouseover(function(e) {
console.log(e);
});
$( "#sample" ).mousedown(function(e) {
console.log(e);
});
$( "#sample" ).mouseup(function(e) {
console.log(e);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment