You didn’t include jQuery in your code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="https://stackoverflow.com/questions/43397734/temp.js"></script>
Make sure it is included before the first reference to jQuery
.
You need to load jQuery.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
You need to add jQuery then load your temp.js
script.
Working example with jQuery.
$(document).ready(function() {
$('#creation').click(function() {
alert("hi");
});
});
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JQuery</title>
</head>
<body>
<div id='display'></div>
<input type="button" id="creation" value="Create"/>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
</body>
</html>