<!--点击变换颜色-->
<style type="text/css">
.current a{
color: red;
}
</style>
<script type="text/javascript">
$('.ul2').on('click','.colr',function(){
<!---->
<!--恢复其他颜色-->
$(this).parent().parent().parent().find(".colr").removeClass("current");
<!--点击添加颜色-->
$(this).addClass("current");
});
</script>
<div class="one">
<div class="tit2">问题分类</div>
<?php foreach($fwzn_list as $k=>$v): ?>
<ul class="ul">
<li class="tit3"><span></span><?php echo $k;?></li>
<ul class="ul2">
<?php foreach($v as $kk=>$vv): ?>
<li class='colr' onclick="cate(<?php echo $kk;?>)"><a id='c<?php echo $kk;?>'><img src="<?= S::getSourcePath('images'); ?>fwzn_13.png" alt=""><?php echo $vv;?></a></li>
<?php endforeach; ?>
</ul>
</ul>
<?php endforeach; ?>
</div>