Castromen,
кука на неделю
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
td{
height: 45px;
border: 1px solid #0000FF;
transition: all .8s ease-in-out;
}
.hide td:nth-child(1){
display: none;
}
.hide td:nth-child(2){
width: 1185px;
background-color: #1E90FF;
}
table{
border-collapse: collapse;
}
</style>
</head>
<body>
<table border="0" class="ms-pub-contentLayout ms-verticalAlignTop">
<tr>
<td valign="top" width="300px"> </td> <!--скрыть при нажатие -->
<td valign="top" width="885px"> </td>
</tr>
</table>
<button class="btn btn-success active" type="button"><span class="glyphicon glyphicon-th-list"></span>
Скрыть/Развернуть</button>
<script>
window.addEventListener("DOMContentLoaded", function() {
var b = document.querySelector(".btn-success"),
c = document.querySelector(".ms-pub-contentLayout");
b.addEventListener("click", function(a) {
a.preventDefault();
c.classList.toggle("hide");
a = c.classList.contains("hide");
var b = new Date((new Date).getTime() + 6048E5);
document.cookie = "hide=" + a + "; path=/; expires=" + b.toUTCString()
});
"true" === function(a) {
return (a = document.cookie.match(new RegExp("(?:^|; )" + a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, "\\$1") + "=([^;]*)"))) ?
decodeURIComponent(a[1]) : void 0
}("hide") && b.click()
});
</script>
</body>
</html>