三种不同样式的打开折叠内容,包括同时折叠多个

三种不同样式的打开折叠内容,包括同时折叠多个

三种不同样式的打开折叠内容,包括同时折叠多个_第1张图片
演示


 

XML/HTML Code
  1. <div id="wrapper">  
  2.   
  3.         <main class="main-wrapper">  
  4.   
  5.             <h2>1.默认设置必须展开一个项目h2>  
  6.             <div id="first">  
  7.                 <h3>Accordion Oneh3>  
  8.                 <div>  
  9.   
  10.   
  11.                     <p>test3p>  
  12.   
  13.                     <p>test4p>  
  14.   
  15.                     <p>test5p>  
  16.                 div>  
  17.   
  18.                 <h3>Accordion Twoh3>  
  19.                 <div>  
  20.   
  21.   
  22.                     <p>test3p>  
  23.   
  24.                     <p>test4p>  
  25.   
  26.                     <p>test5p>  
  27.                 div>  
  28.   
  29.                 <h3>Accordion Threeh3>  
  30.                 <div>  
  31.   
  32.   
  33.                     <p>test3p>  
  34.   
  35.                     <p>test4p>  
  36.   
  37.                     <p>test5p>  
  38.                 div>  
  39.   
  40.                 <h3>Accordion Fourh3>  
  41.                 <div>  
  42.   
  43.   
  44.                     <p>test3p>  
  45.   
  46.                     <p>test4p>  
  47.   
  48.                     <p>test5p>  
  49.                 div>  
  50.   
  51.                 <h3>Accordion Fiveh3>  
  52.                 <div>  
  53.   
  54.   
  55.                     <p>test3p>  
  56.   
  57.                     <p>test4p>  
  58.   
  59.                     <p>test5p>  
  60.                 div>  
  61.   
  62.             div>  
  63.   
  64.   
  65.             <h2>2.同时展开多个项目h2>  
  66.   
  67.             <div id="second">  
  68.   
  69.                 <h3>Accordion Oneh3>  
  70.                 <div>  
  71.   
  72.   
  73.                     <p>test3p>  
  74.   
  75.                     <p>test4p>  
  76.   
  77.                     <p>test5p>  
  78.                 div>  
  79.   
  80.                 <h3>Accordion Twoh3>  
  81.                 <div>  
  82.   
  83.   
  84.                     <p>test3p>  
  85.   
  86.                     <p>test4p>  
  87.   
  88.                     <p>test5p>  
  89.                 div>  
  90.   
  91.                 <h3>Accordion Threeh3>  
  92.                 <div>  
  93.   
  94.   
  95.                     <p>test3p>  
  96.   
  97.                     <p>test4p>  
  98.   
  99.                     <p>test5p>  
  100.                 div>  
  101.   
  102.                 <h3>Accordion Fourh3>  
  103.                 <div>  
  104.   
  105.   
  106.                     <p>test3p>  
  107.   
  108.                     <p>test4p>  
  109.   
  110.                     <p>test5p>  
  111.                 div>  
  112.   
  113.                 <h3>Accordion Fiveh3>  
  114.                 <div>  
  115.   
  116.   
  117.                     <p>test3p>  
  118.   
  119.                     <p>test4p>  
  120.   
  121.                     <p>test5p>  
  122.                 div>  
  123.   
  124.             div>  
  125.   
  126.             <h2>3.同时展开一个,但是可以全部关闭h2>  
  127.   
  128.             <div id="thirth">  
  129.                 <h3>Accordion Oneh3>  
  130.                 <div>  
  131.   
  132.   
  133.                     <p>test3p>  
  134.   
  135.                     <p>test4p>  
  136.   
  137.                     <p>test5p>  
  138.                 div>  
  139.   
  140.                 <h3>Accordion Twoh3>  
  141.                 <div>  
  142.   
  143.   
  144.                     <p>test3p>  
  145.   
  146.                     <p>test4p>  
  147.   
  148.                     <p>test5p>  
  149.                 div>  
  150.   
  151.                 <h3>Accordion Threeh3>  
  152.                 <div>  
  153.   
  154.   
  155.                     <p>test3p>  
  156.   
  157.                     <p>test4p>  
  158.   
  159.                     <p>test5p>  
  160.                 div>  
  161.   
  162.                 <h3>Accordion Fourh3>  
  163.                 <div>  
  164.   
  165.   
  166.                     <p>test3p>  
  167.   
  168.                     <p>test4p>  
  169.   
  170.                     <p>test5p>  
  171.                 div>  
  172.   
  173.                 <h3>Accordion Fiveh3>  
  174.                 <div>  
  175.   
  176.   
  177.                     <p>test3p>  
  178.   
  179.                     <p>test4p>  
  180.   
  181.                     <p>test5p>  
  182.                 div>  
  183.   
  184.             div>  
  185.   
  186.         main>  
  187.   
  188.   
  189.     div>  

 


原文地址: http://www.freejs.net/article_jquerywenzi_172.html

你可能感兴趣的:(网站建设)