Skip to content

Instantly share code, notes, and snippets.

@kraizt
Last active February 28, 2018 13:10
Show Gist options
  • Save kraizt/c28200dec1cbfeb03c243d700d72bed6 to your computer and use it in GitHub Desktop.
Save kraizt/c28200dec1cbfeb03c243d700d72bed6 to your computer and use it in GitHub Desktop.
// 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