飞飞CMS官方论坛

FeiFeiCms官方发布_【电视TV版系统】 通过这个窗口,关注跟踪我们的研发进展 飞飞CMS开发手册 - 飞飞官方论坛说明

FeiFeiCms官方发布_【商业版_V15系统】 功能强大,终身免费升级,建站不二选择 模板展示中心 - 飞飞免费版与收费版介绍

飞飞cms影视系统_免费版_8.1正式版【官方下载】 程序100%开源,视频管理系统PHP版,5分钟快速建站 销售QQ:1306428988 - TG:https://t.me/feifeicms520

0 2338

怎么在下面js里加个‘收起’功能

收藏 跳转到指定楼层
怎么在下面js里加个‘收起’功能  'more':function(){//...效果
                $('.ff-playurl').each(function(i){
                        $this = $(this);
                        $config = $this.attr('data-more')*1;
                        $max = $this.find('li a').size();
                        if(($config+2) < $max && $config>0){
                                $max_html = $($this.find('li:last').prop("outerHTML")).find('a').attr('href','#all').html('全部...');
                                $max_html = '<li class="'+$this.find('li').attr('class')+'">'+$max_html.prop("outerHTML")+'</li>';
                                $this.find('li').each(function(n){
                                        if(n+1 > $config){
                                                $(this).hide();
                                        }
                                });
                                $this.find('li').eq($config).after($max_html);
                                $this.find('li:last').show();
                        }
                 });
                //more点击
                $('.ff-playurl').on('click', 'a', function(e){
                        if($(this).attr('href') == '#all'){
                                $(this).parent().parent().find('li').show();
                                $(this).parent().remove();
                                return false;
                        }
                });
        },

 

                                                   飞飞cms官方论坛-www.feifeicms.vip

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Powered by  © 2006-2024 飞飞网络科技有限公司,官方销售QQ:1306428988 或加Telegram: feifeicms520

手机版  |  飞飞CMS官方论坛 ( 鄂ICP备14015395号-2

立刻咨询
快速回复 返回顶部 返回列表