javascript Toggle HTML element

function Toggle(strObj) {
	if(document.getElementById(strObj).style.display=='block'){
		document.getElementById(strObj).style.display='none'
	}else{
		document.getElementById(strObj).style.display='block'
	}
}
Use this to show/hide a HTML element, such as a div, which has an ID associated with it.

Updated: Tuesday 5th October 2010, 22:55pm

There are 0 comments

Leave a comment of your own

Comments are currently closed.