:star2: 6552 | @manish-giri |http://www.freecodecamp.com/manish-giri
@Benjmhart
$("#searchBox").keypress(function(e,searchTerm){ if (event.keyCode == 13) {
e.preventDefault();
searchTerm = document.getElementById('searchBox').value;
console.log(searchTerm);
searchTerm = encodeURI(searchTerm);
wikiSearch(searchTerm);
};
so you forgot to pass the event-handler (e
) into the function. You previously had #
when getting the element by Id, so that needed to be removed. Not sure if you need the encodeURI..
:cookie: 398 | @konikodes |http://www.freecodecamp.com/konikodes