jQuery тут конечно нафиг
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
table {
display: none;
}
#table_up{
background: #339900
}
#table_down{
background: #FF6666
}
.show table {
display: table;
}
</style>
<script>
window.onload = function() {
var table = document.querySelectorAll("#table_up, #table_down"),
button = document.querySelector("button"),
parent = document.body,
f = +localStorage.getItem("f") || 0;
function show() {
parent.insertBefore(table[+!f], table[f]);
parent.classList.add("show")
}
button.onclick = function() {
f ^= 1;
show();
localStorage.setItem("f", f)
};
show()
};
</script>
</head>
<body>
<table id="table_up" class="table">
<caption>Basic Table UP</caption>
<thead>
<tr class="success">
<th>Name</th>
<th>City</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tanmay</td>
<td>Bangalore</td>
</tr>
<tr>
<td>Sachin</td>
<td>Mumbai</td>
</tr>
</tbody>
</table>
<table id="table_down" class="table">
<caption>Basic Table Down</caption>
<thead>
<tr>
<th>Name</th>
<th>City</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tanmay</td>
<td>Bangalore</td>
</tr>
<tr>
<td>Sachin</td>
<td>Mumbai</td>
</tr>
</tbody>
</table>
<button>table reverse</button>
</body>
</html>