javascript - Jquery show div content onload and hide of the first click -
i have created side menu bar menu items has id's 'h1-1', 'h1-2','h1-3'
, on. when first load page need show 'h1-1'
content. i've written code
$(document).ready(function() { window.onload = $('#h1-1').show(); });
but here, when click other menu item first, 'h1-1'
content still show on page , clicked list item content showing below 'h1-1'
content .
however when 'h1-1'
first , click other list items, works fine (when 'h1-1'
first, 'h1-1'
content still showing , click other list item 'h1-1'
content go away , show clicked item content).
i've tried write hide 'h1-1'
content on first click then, 'h1-1'
content not showing when click 'h1-1'
list item itself.
can suggest way how can solve this..
you relying on content of curpage
hide previous page, initialize "". instead, set first page.
var curpage="h1-1";
Comments
Post a Comment