VPenkov / okayNav

The world's okayest responsive navigation. This is (sort of) a legacy implementation. Please stay tuned to the 3.0 branch (https://github.com/VPenkov/okayNav/tree/v3.0)
4.02k stars 266 forks source link

How to add in this menu all items if window width < 576px ? #58

Closed bpgusar1 closed 6 years ago

bpgusar1 commented 6 years ago

How to add in this menu all items if window width < 576px ?

bpgusar1 commented 6 years ago

I found a solution myself.

if ($(window).width() <= 576) {
        $($('#menu li').get().reverse()).each(function (i, el) {
            $('.okayNav__nav--invisible').prepend(el);
        });
    }