Jquery 代码参考

jquery


<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>
       

未完,,后续更新中,,

猜你喜欢

转载自www.cnblogs.com/jjxhp/p/11360213.html