Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have create a master page with a left panal that contains divs

now i want to hide a perticular div when i navigate to contant page

say for example if a navigate to contant page1 i want to hide div1 from master
like wise from contant page2 i want to hide just div2

can any one help me here but using HTML , CSS , JavaScript only

thank u
Posted

1 solution

Suggestion: It can be done in many ways. Below is one of them(may not be efficient one.)

1. Please add a class or id to the div with the page name.
Eg: Let the page 1 name is PAGE1 then add a class PAGE1 in the div so that from page name we can hide that div.

2. On document ready write get the page name from the URL and hide the div.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900