View Single Post
Old 10-19-2010, 02:29 PM  
sortie
Confirmed User
 
sortie's Avatar
 
Industry Role:
Join Date: Mar 2007
Posts: 7,771
More advanced :

Add a toggle switch :

This is used if you want to allow the surfer to remove the footer but be able to
pull it back up.


- First add "id=footer" to the DIV tag from above post
- then add the code highlighted code below under the DIV tag


<div id=footer class="pos_fixed" style="width:100%;background-color:darkgreen;border:solid yellow 1px;">
<center>This is the footer that does not scroll. Place any HTML you like here.</center>

</div>

<script type="text/javascript">
var mytog = 0;
var putback = document.getElementById("footer").innerHTML;
function footexpand() {
if (mytog == 0) {
document.getElementById("footer").innerHTML = "";
mytog=1;
}
else {
document.getElementById("footer").innerHTML = putback;
mytog=0;
}
}
</script>
<span id=footerbutton style="position:fixed;right:0px;bottom:0px;backgro und-color:blue;border:solid red 1px;" onClick="footexpand();">^^</span>



Use a gif or jpg image in the "footerbutton" span tag instead of the up arrows for a better looking button.


.
__________________
sortie is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote