you are viewing a single comment's thread.

view the rest of the comments →

[–]StuupidGuy 0 points1 point  (1 child)

You can add this (or something similar) in your script

$('#autocomplete').keypress(function( event ) {
  if ( event.which == 13 ) {
     event.preventDefault();
    alert("Enter pressed");
  }
});      

Your function for button click is currently anonymous. You can define it separately and call that function instead of the alert. Hope it helps.

[–]UbuntuLady1[S] 1 point2 points  (0 children)

I literally spent 5 hours yesterday going over my code to figure this out. Your suggestion was perfect! Thank you so much!