The idea here is when people click on "TEST" then it automatically populate the text input and do the search. So I want to simulate Enter Key pressing when clicking on the text "TEST". Is there any ways to do with jQuery?
<div class="item" onclick="myFunc1()"><p onclick="myFunc2()">TEST</p></div>
<script>
function myFunc1() {
document.getElementById("Search").value = "html templates";
}
function myFunc2() {
document.getElementById("Search").focus();
}
</script>
<input type="text" name="search" id="Search">
</div>