jquery - Responsive website not showing menu until page loads -
i making website responsive aim make more "app like" tablet (ipad portrait , bellow) , mobile. is(was) going using css media queries.
the problem page loading. user can search products. responsive menu , other accordian tabs not working until page has loaded. responsive menu http://www.meanthemes.com/plugins/meanmenu/ , accordian jquery. not working mean responsive menu not showing @ , accordion tabs staying open until page has loaded.
i have hidden on page other menus populated database desktop....and have tried totally removing code.....this did speed things little still same problem.
i know answer use jquery mobile(which advised) , start again....but customer wanted site responsive
any advice appreciated
accordion , other menu elements visual components not initialized until javascript them executed.
jquery ui can large 100k , depends upon jquery 80k.
standard practise execute jquery code in $(document).ready()
callback, on mobile device can take while fired. since there lag time while page downloaded on wireless.
you have couple of options.
- reduce size of jquery ui building js features require.
- move
<script>
include tags bottom of page header. it's recommended place scripts @ bottom, because block downloading until completed. if it's important menus appear page may have move them header. - you don't have put javascript code inside
$(document).ready()
. if know javascript placed below dom elements need, elements ready , can turn accordion, jquery must loaded.
Comments
Post a Comment