javascript - Hide an overflowing navigation, but still show dropdowns -
i have site requires "double" navigation bar. show active nav within space, hiding inactive navigation, , animate new nav bar in when user chooses toggle it.
i have jsfiddle here visualize problem: https://jsfiddle.net/j8wyeazv/7/
note dropdowns extend further left container, overflow-x
not option.
edit: should mention, dropdowns have been simplified in jsfiddle, actual dropdowns multiple columns of links, , extend further left , right "parent" link.
how code needs built, may have posed impossibility (without more js). ended settling no overflow, , fading element's opacity
0 when inactive.
updated fiddle: https://jsfiddle.net/j8wyeazv/8/
thanks 2 great solutions roko c. buljan , cespon. both of solutions work under different requirements, encourage others take @ solutions!
Comments
Post a Comment