Passing user input to a jquery selector
I'm creating a search page in a smartphone app, the search page accepts user input and then searches the app for a match and displays the results. For some reason the results come back as "undefined". I set up a jsfiddle to illustrate the problem here http://jsfiddle.net/tonybabb/Lvws4s0u/12/
I did some previous testing with the app using Alert to display the variable and that seems to be OK, I also hard coded the search term in the jQuery statement and that seems to work also so I think the problem is replacing the hard coded search term with a variable in a jQuery statement. Unfortunately I couldn't get Alert to work in jsfiddle so I removed them.
Thanks for any advice.
Tony