Using jQuery to 'click' a li element
if you add dinamically put the click on the list but select the items:
$("#results").on("click", ".searchterm", function(event){
console.log('clicked');
});
try on the fiddle: http://jsfiddle.net/emPKS/
Remove the space in selector
$("li.searchterm").click(function() {
console.log('testing');
});
and You can also use .on
to attach the specific event to the matched elements
$("li.searchterm").on("click",function() {
console.log('testing');
});
Js Fiddle