Answer the question
In order to leave comments, you need to log in
How to prevent vertical scroll from appearing when drop down menu is opened?
Hello.
How to prevent vertical scroll from appearing when drop down menu is opened?
Here is an example.
If you remove it, then how to bind the drop-down list to the desired button?
It is necessary that the drop-down list be at the top of the block with a scroll, how to implement this? .select{ position: relative;}
Answer the question
In order to leave comments, you need to log in
For example, like this:
codepen.io/anon/pen/zvaLKL
Remove position: relative from .select and add code:
$(function()
{
$('.select').on('shown.bs.dropdown', function() {
var $button = $("a", this).first();
var offset = $button.offset();
$(".dropdown-menu", this).css({
top: offset.top+$button.outerHeight(),
left: offset.left
});
});
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question