1 <script language="javascript">2 ??$(document).ready(function(){3 4 ????????$(".moren a").on("click",function(){5 ????????$(this).parent(".moren").toggleClass("dqon");6 ????????})7 8 ??});9 </script>
.moren列表下面的a标题行点击后,给当前(this)同级的父类增加class叫‘dqon’;在点击就去掉‘dqon’;
点击当前选项显示当前内容jquery
原文地址:https://www.cnblogs.com/abc-x/p/9282243.html