Skip to content

Instantly share code, notes, and snippets.

@kraizt

kraizt/jquery compare.html

Last active Feb 28, 2018
Embed
What would you like to do?
// html
<html>
<head>
<title>Hello jQuery my old friend</title>
</head>
<body>
<h1>Hello from darkness</h1>
<input id=”message”>
</body>
// js
<script type=”text/javascript”>
$(#message’).on(‘keyup’, function(){
$message(#message’).on(‘keyup’, function(){
var message = $(#message’).val();
$(‘h1’).text(message);
})
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment