The following script was found on StackOverflow. It is suppose to simulate a button click with the up-tick of an Enter key.
$("#id_of_textbox").keyup(function(event) {
if (event.keyCode === 13) {
$("#id_of_button").click();
}
});
Now, I am not using it for a textbox, but for a search box. In order to get it to work I have tried the following:
Used the <form> element as the selector for the keyup() function.
Used the <input> element of the search box as the selector for the keyup() function
Entered the code in various places within my scri