点击当前选中可多选
$(function(){ $(".project li").toggle(function(){ $(this).css({"backgroundColor":"#00c5b5","color":"#fff"}); $(this).children("span").css("display","inline-block"); },function(){ $(this).css({"backgroundColor":"#fff","color":"#000"}); $(this).children("span").css("display","none"); }); })
<ol class="project cleafix"> <li><span></span>牙齿矫正</li> <li><span></span>牙齿种植</li> <li><span></span>牙齿修复</li> <li><span></span>牙齿美白</li> <li><span></span>超薄贴面</li> <li><span></span>儿牙齿科</li> </ol>