Javascript Show Hide Toggle Web-development (jquery),web-development (PHP) Javascript Show Hide Toggle Javascript show hide toggle
<script type="text/javascript">
function toggle(obj){
var el = document.getElementById(obj);
if (el.style.display != 'none') {
el.style.display = 'none';
}
else {
el.style.display = 'inline';
}
}
</script>
<a href="#test1" onclick="toggle('table1');">Toggle 01 </a><br />
<table cellspacing="0" cellpadding="5">
<tr>
<td width="100" align="center"><font>PROGRAMME</font></td>
<td width="150" align="center"><font>OBJECTIVES</font></td>
<td width="210" align="center"><font>MODULES</font></td>
</tr>
</table>
<br/>
<a href="#test2" onclick="toggle('table2');">Toggle 02</a><br />
<table cellspacing="0" cellpadding="5">
<tr>
<td width="100" align="center"><font>PROGRAMME</font></td>
<td width="150" align="center"><font>OBJECTIVES</font></td>
<td width="210" align="center"><font>MODULES</font></td>
</tr>
</table>
Demo
http://dl.dropbox.com/u/7106563/r-ednalan/show_hide_toggle.html
0 Response to "Javascript Show Hide Toggle"
Posting Komentar