Using bootstrap, I have a dropdown menu(s) inside a div with overflow:hidden, which is needed to be like this. This caused the dro
I had some kind of scroll problem with most of solutions in this and other questions I've seen on SO. What worked for me was making the dropdown position inherit:
.dropdown {
position: inherit;
}
And then set the dropdown-menu position using JavaScript:
$(document).on("show.bs.dropdown", function () {
var dropdownToggle = $(this).find(".dropdown-toggle");
var dropdownMenu = $(this).find(".dropdown-menu");
dropdownMenu.css({
"top": (dropdownToggle.position().top + dropdownToggle.outerHeight()) + "px",
"left": dropdownToggle.position().left + "px"
});
});
Here is a working example: http://jsfiddle.net/ck66ee9q/