Skip to content

Instantly share code, notes, and snippets.

@adammorris
Created June 17, 2012 12:41
Show Gist options
  • Save adammorris/2944449 to your computer and use it in GitHub Desktop.
Save adammorris/2944449 to your computer and use it in GitHub Desktop.
With jQuery
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>$title</title>
$styles
</head>
<body>
<h1>$title</h1>
<p>
<input type="text" id="txt" value="Hello, $title!" />
<input type="button" id="btn" value="hello" />
</p>
$scripts
</body>
</html>
$(function() {
$('#btn').on('click', function() {
alert($('#txt').val());
});
});
body {
background: #eee;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment