View Full Version : how to make this footer slider, open when start?
davelf
06-20-2011, 09:05 AM
I have this script to make the footer slide-up when it's click:
<script src="script/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$('#footerSlideButton').click(function () {
$('#footerSlideContent').slideToggle();
});
});
</script>
or you can see it here:
http://imaxxo.net/fott/
How to make the script that make my footer content open first?
Thanks you very much...
jscheuer1
06-21-2011, 04:11 AM
Three choices (there are others) for now -
In style.css line 566 (highlighted):
#footerSlideContent {
width: 100%;
height: 116px;
display:none;
margin-top:-20px;
}
Get rid of that.
Or, for a bit of a delay have the script execute (addition red):
<script type="text/javascript">
$(function() {
$('#footerSlideButton').click(function () {
$('#footerSlideContent').slideToggle();
}).click();
});
</script>
Or, for more of a delay before it slides into view:
<script type="text/javascript">
$(function() {
$('#footerSlideButton').click(function () {
$('#footerSlideContent').slideToggle();
})
});
$(window).load(function(){
$('#footerSlideButton').click();
});
</script>
BTW, there's an unrelated script error on the page. This sound code appears left over from a previous edit:
<!-- Begin Toggle Sound Body Code -->
<!--[if IE]>
<script type="text/javascript">
if(mpIsInstalled)
document.write('<object id="sound" height="0" width="0"'+
' classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">\n'+
'<param name="playCount" value="20000">\n'+
'<\/object>\n');
else
document.write('<bgsound id="sound" src="" loop="-1">')
</script>
<![endif]-->
<script type="text/javascript">
if (document.getElementById&&!document.getElementById('sound')){
document.write('<di . . .
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.