admin管理员组文章数量:1428611
I don't like the default Accordion icons and I want to change them. This link here:
shows the option to change the header but it requires to specify icons. I don't need icons. I just need a simple (+)
and (-)
How can I do that with accordions?
I don't like the default Accordion icons and I want to change them. This link here:
http://jqueryui./demos/accordion/#option-header
shows the option to change the header but it requires to specify icons. I don't need icons. I just need a simple (+)
and (-)
How can I do that with accordions?
Share Improve this question asked May 19, 2012 at 3:11 Tim TomTim Tom 2,1626 gold badges27 silver badges39 bronze badges1 Answer
Reset to default 5Hiya working sample demo http://jsfiddle/zM5Vj/ or http://jsfiddle/zM5Vj/show/
Hope this helps, + will be shown when accordion is collapsed where as - in case of open accordion.
have a nice one!
Jquery code which adds + and - accordingly Rest full code is in fiddle, If you want I can copy paste the whole code. Please let me know how it goes!
$(function(){
$('#accordion .fullChild>a.opener').text('+').addClass('box');
$('#accordion .opener').click(function() {
if($(this).text() == "-") {
$(this).text("+");
}
else {
$('#accordion .opener').text("+");
$(this).text("-");
}
});
});
本文标签: javascriptHow do I change accordion header with plus and minus symbolStack Overflow
版权声明:本文标题:javascript - How do I change accordion header with plus and minus symbol? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745524563a2661777.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论