slidetoggle - jQuery showing at first instance instead of hide -


i using below code menu apear on mobile css site.

at moment appearing straight away when site loaded , i'd rather load on request when used... help? - know it's quick solution cannot seem work out, i've tried other forums , searched online , yet hear response.

<script type="text/javascript"> jquery(document).ready(function($){      /* prepend menu icon */     $('#nav-wrap').prepend('<div id="menu-icon"><img id="logo" src="<?php echo site_url(); ?>/wp-content/themes/blue-and-grey/images/mobileimages/hme_btn.png" /></div>');      /* toggle nav */     $("#menu-icon").on("click", function(){         $("#nav").slidetoggle();         $(this).toggleclass("active");     });  }); </script> 

you add simple css hide element

css

#menu-icon{    display: none; } 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -