How to 'open' Bootstrap Dropdown menus on pageload on screens smaller than 600px
问题 im trying to get my bootstrap dropdowns to be open by default at screens at or smaller than 600px (mobile). this seems to get it to try but it looks like something overrides it and closes it again: <script type="text/javascript"> $(window).load(function () { var width = $(window).width(); if (width >= 0 && width <= 600) { $('#openBrowseMobile').addClass('open'); } else { $('#openBrowseMobile').removeClass('open'); } }) .load(); </script> any ideas on how to make this work? I can get it to