I work with dropdown menu, and this dropdown i have on the table.
But if is not enough place to open dropdown, it's not visible:
So i want to open this menu in up side, if in the bottom is no place enough, how i can do this?
My code - jsFiddle
Code for opening dropdown:
$(document).ready(function () {
Array.from(document.querySelectorAll('.custom-style')).forEach(function (menu_side) {
menu_side.onclick = ({
target
}) => {
if (!target.classList.contains('more')) return
document.querySelectorAll('.dropout.active').forEach(
(d) => d !== target.parentElement && d.classList.remove('active')
)
target.parentElement.classList.toggle('active');
}
});
});
I try to use few methods, but it's not works for me, now i sutck i have not idea how to fix this.
