P
P
pagemaster2019-11-29 12:42:37
User navigation
pagemaster, 2019-11-29 12:42:37

How to make a "Show more" button for the menu?

Good afternoon.
There is a php loop that displays all menu items. The menu styles are made in the form of a horizontal one, but when there are a lot of elements, they "jump" to the second row. The idea is to somehow calculate the width of the menu block and display in it only as many items as fit into this block width, and for the rest, make the "More" button, when clicked, a drop-down vertical menu appears with the rest of the elements, here's an example 5de0e8050bdbc540284488.png
: JS is complete zero, and without it, I believe, there is no way to do it here ...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question