danielstocks / jQuery-Collapse

A lightweight (~1kb) jQuery plugin that enables expanding and collapsing content
http://webcloud.se/jQuery-Collapse/
MIT License
679 stars 153 forks source link

ClickQuery doesn't work on <i> #93

Closed ofry closed 4 years ago

ofry commented 7 years ago

If I set smth like:


 $('.widget').collapse({
        open: function() {
            console.log(this);
            this.slideDown(200);
        },
        close: function() {
            console.log(this);
            this.slideUp(200);
        },
        query: 'div.whead',
        clickQuery: 'i.icon-eject',
    });

it doesn't work when I click on icon


 <I 
class="iconb icon-eject" aria-hidden="true"></I>

Setting clickQuery to outer div solves this problem.