Tek tıklama ile div gizleme açma kapama. Toggle (Show/Hide) Element

<html>

<head>

</head>

<body>

<script type=”text/javascript”>
<!–
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == ‘block’)
e.style.display = ‘none’;
else
e.style.display = ‘block’;
}
//–>
</script>

<a href=”#” onclick=”toggle_visibility(‘foo’);”>Click here to toggle visibility of element #foo</a>
<div id=”foo”>This is foo</div>

</body>

</html>

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)