开发框架 版主:迅睿框架研发组
JS代码报错模板系统故障
类型:迅睿CMS 更新时间:2021-10-27 15:09:03 代码保护 模板代码格式化

因为两段js代码,报错如图所示

{xunruicms_img_title}

js代码如下:

<script type="text/javascript">
        TouchSlide({
            slideCell: "#focus",
            titCell: ".hd ul", //开启自动分页 autoPage:true ,此时设置 titCell 为导航元素包裹层
            mainCell: ".bd ul",
            effect: "leftLoop",
            autoPlay: true, //自动播放
            autoPage: true, //自动分页
            delayTime:500,
            interTime:3500
        });
    </script>



<script>
$('.news_tab li').mouseover(function (){$(this).addClass("on").siblings().removeClass("on");$(".news").eq($('.news_tab li').index(this)).show().siblings(".news").hide();});

$(".nav h2").click(function(){
$(".nav_sub").slideToggle("slow");
});
$(".share_btn").click(function(){
$(".share").slideToggle("slow");
});
$(".bds_more").click(function(){
$(".bdshare_popup_box").css("display","none");
});
})
</script>


回帖
  • 迅睿框架技术-李波
    #1楼    迅睿框架技术-李波
    2021-10-27 15:01:42
    Chrome 0
    {code}
    $('.news_tab li').mouseover(function (){$(this).addClass("on").siblings().removeClass("on");$(".news").eq($('.news_tab li').index(this)).show().siblings(".news").hide();});
    {/code}
  • xrc123
    #2楼    xrc123
    2021-10-27 15:07:42
    Chrome 0
    迅睿框架技术-李波 什么原因,不懂,以后遇到这种错误怎么解决
  • 迅睿框架技术-李波
    #3楼    迅睿框架技术-李波
    2021-10-27 15:09:03
    Chrome 0
    将模板文件放到迅睿cms之前需要把原来的html文件的代码格式化一次,用这个工具:http://tool.chinaz.com/tools/jsformat.aspx 就不会有错了