<script type="text/javascript">
jQuery(document).ready(function($){
$(document).on('click','.video-cat-title a',function(){
let id = $(this).data('cat');
$(this).parents('ul').find('a').each(function(){
let item = $(this).data('cat');
$(this).parent('li').removeClass('cur_cate');
$('.video_section[data-name="'+item+'"]').addClass('hide');
});
$('.video_section[data-name="'+id+'"]').removeClass('hide');
$(this).parent('li').addClass('cur_cate');
});
});
</script>
原文:https://www.cnblogs.com/jjxhp/p/11360213.html