js绑定动态生成的li事件

$('.nav-ul').on('click','li',function(){
   //code......
}

原文地址:https://www.cnblogs.com/pangchunyu/p/13064819.html