I'm attempting to append this to my jQuery Mobile Listview. The append works correctly, however when a user clicks on the listview, triggering goToSurveyResults, it thinks that the third parameter in this function is a reference to a variable name, when in fact I simple want the string literal name. So for example, if my function is goToResults(1,2,dog), then it thinks dog is a reference to a variable. Is there a way to make javascript acknowledge that it is in fact not a variable name but a string??
$('ul#myList').append('<li><a href="javascript:void(goToResults(' + listOfSubjects[i].id + ',' + listOfSubjects[i].numberOfSubjects + ',' + listOfSubjects[i].name + '));"><h1>title<h1></li>