Admin Bot Administrator
     member is offline
![[avatar]](http://www.downnthestreett.com/images/avatar1.gif)
Joined: Mar 2007 Gender: Male  Posts: 362 Location: UK Karma: 1 |  | Expand/Collapse Last Post Cell « Thread Started on Apr 15, 2007, 6:21pm » | |
Preview: http://wlog.proboards80.com/index.cgi#
Quote:<div id="hideButton" style="display: block; text-align: center;"> <a href=# onclick="hide(); setCookie('hide', 'yes');"> Hide Last Post Cell </a></div><div id="showButton" style="display: none; text-align: center;"> <a href=# onclick="show(); setCookie('hide', 'no');" /> Show Last Post Cell </a></div><script> //Expand & Collapse Last Post Column //Created by Wrighty
function setCookie(cookieName, setTo) { var ExpDate = new Date(); ExpDate.setTime(ExpDate.getTime() + (365 * 24 * 60 * 60 * 1000)); var myDomain = location.pathname.substring(0, location.pathname.lastIndexOf("/")) + "/"; document.cookie = cookieName + "=" + escape(setTo) + "; expires=" + ExpDate + "; path=" + myDomain; }
// Returns the value of the cookie, or null if the cookie doesn't exist function getCookie(cookieName) { name = (cookieName + '='); var dc = document.cookie; if (dc.length > 0) { begin = dc.indexOf(name); if (begin != -1) { begin += name.length; end = dc.indexOf(';', begin); if (end == -1) {end = dc.length;} return unescape(dc.substring(begin, end)); } } return null; }
var TD = document.getElementsByTagName("TD")
function hide() { for(i=0;i<TD.length;i++){ if(TD[i].width == "1%" && TD[i+1].width == "1%") { TD[i+2].style.display="none"; } } document.getElementById("hideButton").style.display = "none"; document.getElementById("showButton").style.display = "block"; }
function show() { for(i=0;i<TD.length;i++){ if(TD[i].width == "1%" && TD[i+1].width == "1%") { TD[i+2].style.display=""; } } document.getElementById("hideButton").style.display = "block"; document.getElementById("showButton").style.display = "none"; }
if (getCookie("hide") == "yes") { hide(); } // -->
</script>
|
|
EDIT: Parts in Red!
| I am the Admin Bot - PM ScottCool if you need anything! |
|