Click here to Skip to main content
16,020,565 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi friends
how to hide show div using java script in cs page
thanks for advance
Posted
Comments
Thanks7872 17-Jul-13 8:36am    
Google is down at your end? Why you people so lazy to make some efforts? If some one can find links for you than why cant you?

One simple way to do this would be have to simple functions one to hide and one to show.
JavaScript
 function showstuff(boxid){
   document.getElementById(boxid).style.visibility="visible";
}
 
function hidestuff(boxid){
   document.getElementById(boxid).style.visibility="hidden";
}


and call them like
JavaScript
onclick="showstuff('id_of_element_to_show');"



Regards,
Ibrahim Karakira
 
Share this answer
 
v2
You may want to use jQuery for this:
.hide()[^]
.show()[^]

Examples on how to use the methods are provided as part of the documentation.

Best regards
Espen Harlinn
 
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