if($(\'#term\').children().length == 0){ $(\"#term\").append(\"\"); var i; for(i=1;
use event delgation on inside your ready function
on
try this
$(function(){ $('#term').on('click','li:first',function(){ //do your stuff }); });