第30款插件:第25款插件:jquery.accordion.js 纵向手风琴效果插件

描述:这款手风琴效果适用于折叠的菜单,方便使用!用这款插件制作极其方便,只需要定义很少的参数,便可制作出纵向手风琴效果!
图片展示:


兼容浏览器: IE6+/Firefox/Google Chrome
官方链接: 暂无
JS下载: http://ijquery.360sites.cn/js/jquery.accordion.js
预览: http://ijquery.360sites.cn/demo/accordion
打包下载: http://ijquery.360sites.cn/demo/accordion/accordion.zip
参数说明: 

JS引用代码:特别注意,这里需要引入demensions.js这个js

  1. <script type="text/javascript" src="http://ijquery.360sites.cn/js/jquery-1.7.2.min.js"></script>
  2. <script type="text/javascript" src="http://ijquery.360sites.cn/js/jquery.dimensions.js"></script>
  3. <script type="text/javascript" src="http://ijquery.360sites.cn/js/jquery.accordion.js"></script>
  4. <script type="text/javascript">
  5.         $().ready(function(){
  6.                 $('.basic').accordion({
  7.                         event: 'mouseover'
  8.                 });
  9.         });
  10. </script>
复制代码
HTML代码:
  1. <div class="basic" style="margin:0 auto;margin-top:50px;" >
  2.         <a>菜单一:</a>
  3.         <div>
  4.                 <p>
  5.                         You've seen it coming!

  6.                         Buy now and get nothing for free!

  7.                         Well, at least no free beer. Perhaps a bear,

  8.                         if you can afford it.
  9.                 </p>
  10.         </div>
  11.         <a>菜单二:</a>
  12.         <div>
  13.                 <p>
  14.                         your bear, you have to admit it!

  15.                         No, we aren't selling bears.
  16.                 </p>
  17.         </div>
  18.         <a>菜单三:</a>
  19.         <div>
  20.                 <p>
  21.                         get two for three beer.
  22.                 </p>
  23.                 <p>
  24.                         And now, for something completely different.

  25.                         And now, for something completely different.

  26.                         And now, for something completely different.

  27.                         And now, for something completely different.

  28.                         And now, for something completely different.

  29.                         And now, for something completely different.

  30.                         And now, for something completely different.

  31.                         And now, for something completely different.

  32.                         Period.
  33.                 </p>
  34.         </div>
  35. </div>
复制代码
CSS代码: 这里需要两张图片,就是鼠标经过时的两张图片,在这里就不上传了,自己随便制作两个高29px的图片即可!
  1. <link rel="stylesheet" href="demo.css" />
复制代码
即:
  1. .basic  {
  2.         width: 260px;
  3.         font-family: verdana;
  4.         border: 1px solid black;
  5. }
  6. .basic div {
  7.         background-color: #eee;
  8. }

  9. .basic p {
  10.         margin-bottom : 10px;
  11.         border: none;
  12.         text-decoration: none;
  13.         font-weight: bold;
  14.         font-size: 10px;
  15.         margin: 0px;
  16.         padding: 10px;
  17. }
  18. .basic a {
  19.         cursor:pointer;
  20.         display:block;
  21.         padding:5px;
  22.         margin-top: 0;
  23.         text-decoration: none;
  24.         font-weight: bold;
  25.         font-size: 12px;
  26.         color: black;
  27.         background-color: #00a0c6;
  28.         border-top: 1px solid #FFFFFF;
  29.         border-bottom: 1px solid #999;
  30.         
  31.         background-image: url("AccordionTab0.gif");
  32. }
  33. .basic a:hover {
  34.         background-color: white;
  35.         background-image: url("AccordionTab2.gif");
  36. }
  37. .basic a.selected {
  38.         color: black;
  39.         background-color: #80cfe2;
  40.         background-image: url("AccordionTab2.gif");
  41. }
复制代码

[转] http://ijquery.360sites.cn/forum.php?mod=viewthread&tid=30

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值