Click here to Skip to main content
15,915,508 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hi,
How can I disable a content(<p>,<h1>,<h2>, etc) on web by clicking a button, so when I click the Project button the project content will show then when I click the home project the project content will disable(can't visible) and this on the center of the web page. And I don't know where to start, I stucking in this and I know how to code that. So please help me to solve this problem.
Posted
Updated 27-Oct-15 18:18pm
v2
Comments
Mohibur Rashid 28-Oct-15 0:20am    
P, H1 or H2 are not any kind of input object. Disable in this term does not make much sense. First, reconstruct how you want to solve the issue. And then show us where you are stuck
Sergey Alexandrovich Kryukov 28-Oct-15 2:08am    
Exactly. The notion makes no sense.
—SA
Krunal Rohit 28-Oct-15 0:30am    
Why ?

-KR
Debojyoti Saha 28-Oct-15 1:26am    
You can use JavaScript or Jquery to Show and hide any control.
Sergey Alexandrovich Kryukov 28-Oct-15 2:07am    
It's clear what "disable" means to an input element. But what is it supposed to mean for non-editable element? Or do you want to make it editable? If not, the question makes no sense at all. (Consider it is "always disabled".)
—SA

1 solution

Use onclick function to show and hide the content.That means when you click upon project content show the hidden content and when you click upon home project content show the home project content and hide the project content.You can use jquery /javascript hide/show functionality.
 
Share this answer
 
v2

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