开发者

In JQuery UI Accordion, How to display two icons for one state?

开发者 https://www.devze.com 2023-02-13 00:43 出处:网络
I have the following icons in JQuery accordion setup: icons: { \'header\': \'ui-icon-plus\', \'headerSelected\': \'ui-icon-minus\' }

I have the following icons in JQuery accordion setup:

icons: { 'header': 'ui-icon-plus', 'headerSelected': 'ui-icon-minus' }

Is it possible that I can have 开发者_运维百科two icons at the same time for 'header' instead of just one.

Hence, the question is to display two icons for one 'Header'/'headerSelected' state?


Something like it will work

$('#myAccordion > h3').click(function(){

    if($(this).hasClass("ui-state-active"))
    {
        // insert your image/text
        $this.append("<span id='test'>Hello World</span>");
    }
    else
    {
        $("#test").remove();
    }
});
0

精彩评论

暂无评论...
验证码 换一张
取 消