HTML: <div class="time-sort"> <div class="border-time border-first active" onclick=""><span class="border-txt">相关度排序</span> <div class="bottom-btn"></div> </div> <div class="border-time" ><span class="border-txt">时间降序</span> <div class="bottom-btn"></div> </div> <div class="border-time border-time2"><span class="border-txt">时间升序</span> <div class="top2-btn"></div> </div>JS:$(document).ready(function (){ //时间排序 $('.border-time').click(function(e){ event.stopPropagation(); $('.border-time').removeClass('active'); $(e.target).addClass('active'); event.stopPropagation(); });})
添加回答
举报
0/150
提交
取消