I\'m trying to create a little search box that allows you to search Twitter based on the keyword you enter in the input field. While it\'s work, it only works if you press the S
Try create listeners for both key press and mouse clicks.
function myFunction(e){
if (e.which=='13' || e.type=='click'){
// Run your code here
}
}
$(document)
.on('click', '#startSearch', myFunction)
.on('keypress', this, myFunction);