zoukankan      html  css  js  c++  java
  • 织梦产品页折叠菜单,进入定位默认展开

    织梦做产品栏目的时候,会有一级栏目和二级栏目,一般都喜欢用折叠的效果!!但是点击进入的话,默认会关闭!怎么才能让它默认打开呢!

     <script>
       $(document).ready(function () {
    		openoff('#part2_{dede:field.id/}');
    		openoff('#part2_{dede:field.reid/}');
    	})
       function openoff(obj){
    	   $(obj).next("dd").css("display","block");
    	   $(obj).addClass("launched");
       }
       </script>
    
    <div class="menu" id="sidebar" data-csnow="2" data-class3="0" data-jsok="2"> {dede:channelartlist typeid=27}
      <dl class="list-none navnow">
        <dt id='part2_{dede:field name="id"/}' ><a href='{dede:field name="typeurl"/}'  title='{dede:field name="typename"/}' ><span>{dede:field name="typename"/}</span></a></dt>
        <dd class="sub" style="display:none;"> {dede:channel type='son' noself='yes'}
          <h4 id='part3_[field:id/]'><a href="[field:typedir function="str_replace('{cmspath}','',@me)"/]"  title='[field:typename /]' class='nav'><span>[field:typename /]</span></a></h4>
          {/dede:channel}  </dd>
      </dl>
      {/dede:channelartlist}
      <div class="clear"></div>
    </div>
      <Style type="text/css">
    	.launched{background-image:url(/skin/images/nav_hover.jpg);color: #d5b687;}
     	.list-none{ list-style:none; padding:0px; margin:0px;}
    	.menu dl{ margin-top:5px; }
    	.menu dt{cursor: pointer;margin-top: 10px;font-weight: bold;font-size: 16px;font-family: "微软雅黑";color: #0d2180;line-height: 53px;padding-left: 48px;
    background: url(/skin/images/nav.jpg) no-repeat;}
    	.menu h4 a{ display: block; 200px;height: 28px;font-family: "微软雅黑";text-align: center;font-size: 14px;line-height: 28px;color: #333; }
    	.menu h4 span{ display: block; 200px;height: 28px; font-weight:100;font-family: "微软雅黑";text-align: center;font-size: 14px;line-height: 28px;color: #333; }
    	.menu h4 a:hover{color: #fff;background-color: #d5b687;}
    </Style>
    

      

  • 相关阅读:
    反悔贪心 学习笔记
    「CF901C」Bipartite Segments 题解
    「HEOI2015」公约数数列 题解
    拓展欧拉定理
    莫比乌斯反演题目选做
    八月水题录
    chapt15、使用虚拟内存
    chapt16、线程堆栈
    chapt14、探索虚拟内存
    get files version by vbs
  • 原文地址:https://www.cnblogs.com/houdj/p/7581017.html
Copyright © 2011-2022 走看看