jQuery UI手风琴 – 如何完全删除样式?

我喜欢jQuery手风琴的功能(http://jqueryui.com/demos/accordion/),但是我不想要风格!

我想摆脱所有的风格,img,边框,颜色等…

我看不到这个选项,这是他们应该添加的.还是我错了?

解决方法

你可以自己制作手风琴.使用没有UI的jQuery手风琴是毫无意义的.创建您自己的手风琴适应您的网站是一件容易的事.你只需要修改你想要构建它的方式…让我们说:
<div id='container'>
  <a href='javascript:;'>First link</a>
  <div class='content'>  SOME CONTENT HERE </div>
  <a href='javascript:;'>Second link</a>
  <div class='content'>  SOME CONTENT HERE </div>
  ...
</div>

那么你只需要做一些事情

//On click any <a> within the container
$('#container a').click(function(e) {
        //Close all <div> but the <div> right after the clicked <a>
    $(e.target).next('div').siblings('div').slideUp();
        //Toggle open/close on the <div> after the <a>,opening it if not open.
        $(e.target).next('div').slidetoggle();
});

您现在可以根据需要编辑您的课程,因为您实际上不需要JavaScript.请注意,类“内容”可以包含任何您想要的内容,包括其他或由于.siblings和.next仅适用于同一层次结构.

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: &lt;span id=&quot...
jQuery 添加水印 &lt;script src=&quot;../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...