Hide Bootstrap sub menus on mobiles -


i using nav walker enable drop down menus using bootstrap in wordpress, , works fine. trying figure out there way disable drop downs on mobiles, perhaps using media queries?

the reason want because there lot of pages , links on 3rd tier flies off mobile screen. top level navigation have links sub menu items anyway, in mobiles have top level items shown, , disable sub menus being displayed.

also not using nav collapse icons, didnt want use on project.

yeah can done media queries. 1 targets mobile devices:

@media screen , (max-width: 480px), screen , (max-device-width: 640px) {     .navigation {display:none;} } 

of course, have keep eye out sizes of screens days. 1 alternative solution in javascript, , check useragent:

if (navigator.useragent.match(/(iphone|ipad|ipod|android|blackberry|webos|windows phone)/i)) {     // i'm mobile :-) } 

Comments