soundasleep / jquery-dropdown

Bootstrap-style dropdowns with some added features and no dependencies.
Other
767 stars 268 forks source link

bug - dropdown not hide #119

Closed fe3dback closed 7 years ago

fe3dback commented 7 years ago
<div class="btn btn-red active big" data-jq-dropdown="#js-dropdown-catalog" data-vertical-offset="10">
            <div class="inline-icon"><i class="icon icon-burger"></i></div>Catalog
</div>
<div class="jq-dropdown jq-dropdown-tip jq-dropdown-anchor-right" id="js-dropdown-catalog">
            <div class="jq-dropdown-panel"><b>hello world!</b></div>
</div>

When i click to button (trigger), dropdown correctly showing, but not closed automatic when i click to trigger again. Or i can click anywhere on page, result is same, dropdown stay on page.

All styles append to dropdown:

element.style {
    display: block;
    left: 214.5px;
    top: 210px;
}
.jq-dropdown.jq-dropdown-tip {
    margin-top: 8px;
}
.jq-dropdown {
    position: absolute;
    z-index: 1039;
    display: none;
}
user agent stylesheet
div {
    display: block;
}

Class .jq-dropdown-open correctly append to button and removed from it when i press btn on/off.

fe3dback commented 7 years ago

Linux Mint / Chromium Version 55.0.2883.87 (64-bit) Page have only one vendor lib (slick.js)

claviska commented 7 years ago

Can you post a reduced test case demonstrating this behavior? (A fiddle would be awesome.)

Just need to make sure you don't have any external code conflicting with the plugin.

fe3dback commented 7 years ago

https://jsfiddle.net/1m5Le31n/3/

claviska commented 7 years ago

Thanks, something definitely seems broken. I'll try to get to this when I have time.

two-bridges commented 7 years ago

in function hide()

this $(document).find('.dropdown:visible').....

should be $(document).find('.jq-dropdown:visible').....