jquery ui accordion avoid closing item wnen clicking on another one

后端 未结 4 1912
夕颜
夕颜 2021-01-03 12:35

starting from existing fiddle, I\'ve created this sample: http://jsfiddle.net/2DaR6/90/

Here\'s the html code:

4条回答
  •  滥情空心
    2021-01-03 12:57

    You should not use jquery accordion for this kind of purpose. However, its relatively easy to override any element events behaviour. When accordion is initialized, you just have to override click handler to corresponding elements.

    In your case, this giving something like this:

    $('#accordion .accClicked')
            .off('click')
        .click(function(){
            $(this).next().toggle('fast');
        });​
    

    See working jsFiddle

提交回复
热议问题