码迷,mamicode.com
首页 > Web开发 > 详细

Jquery div展开收缩

时间:2014-08-20 12:10:32      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   java   io   ar   cti   

 1 <html>
 2 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
 3 <head>
 4 <script type="text/javascript" src="js/jquery1.3.2.js"></script>
 5 <script type="text/javascript">
 6 function showFile() {
 7  if ($("#file").css("display") == "none") {
 8   $("#file").css("display", "inline");
 9   $("#sign").text("-");
10  } else {
11   $("#file").css("display", "none");
12   $("#sign").text("+");
13  }
14  ;
15 }
16 $(document).ready(function(){
17 $("#showfile").click(showFile);
18 })
19 </script>
20 </head>
21 <body>
22 <div id=showfile> <span id=sign>+</span> 信息中心 </div>
23 <div id=file style="display:none">
24   <ul>
25     <li>1</li>
26     <li>2</li>
27   </ul>
28 </div>
29 </body>
30 </html>

 

Jquery div展开收缩,布布扣,bubuko.com

Jquery div展开收缩

标签:style   blog   http   color   java   io   ar   cti   

原文地址:http://www.cnblogs.com/lihongtu/p/3924185.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!