asked on
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/HTML/Q_27039542.html</title>
<script type="text/javascript" src="http://filedb.experts-exchange.com/incoming/2011/05_w20/458595/jquery-1.5.2.min.js"></script>
<script type="text/javascript">
jQuery(document).ready( function() {
$("input[type=button]").click( function() {
$("#table-wrapper table").toggle();
});
});
</script>
<style type="text/css">
table { border: 1px solid red; }
#one { background-color: beige; }
#two { background-color: silver; display: none; }
</style>
</head>
<body>
<div id="table-wrapper">
<table id="one">
<tr><td>a</td><td>b</td><td>c</td></tr>
<tr><td>i</td><td>j</td><td>k</td></tr>
<tr><td>x</td><td>y</td><td>z</td></tr>
<tr><td colspan="3"><input type="button" value="toggle"></td></tr>
</table>
<table id="two">
<tr><td>1</td><td>2</td><td>3</td></tr>
<tr><td>4</td><td>5</td><td>6</td></tr>
<tr><td>7</td><td>8</td><td>9</td></tr>
<tr><td colspan="3"><input type="button" value="toggle"></td></tr>
</table>
</div>
</body>
</html>
ASKER
JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.
TRUSTED BY
ASKER
I tried your z-index concelpt without "aboslute", but the elements were still "butting heards".