i'm a newbie. i'm trying to call a function when i press the enter key. But it's not working. The error that i get on console is "Uncaught Reference Error: $ is not defined" on line 59. Can someone please help me to remove this. Thank you in advance. Below is the little piece of code of my program which is not working.
<body>
<input id="sear" autocomplete="off" type="text" placeholder="Search here..." name="search" onkeyup="search(this.value)" />
<button id="btnss" onclick="test()">Click</button>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
$("#sear").keypress(function(e) { <!-- This is line 59 -->
if (e.which == 13) {
$("#btnss").click();
return false;
}
});
});
</script>
</body>