The thread you pointed to addresses animating a DIV that changes content dynamically (after the page has loaded). This doesn't apply in your case if I understand how the login system works on your forum.
In general, this script requires that the animated content be wrapped in a DIV, with the script animating that DIV itself. Based on your source, try this:
Change the following code on your page:
Code:
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="http://www.chihuahuaforum.dk/Themes/fg-forum/images/upshrink.gif" alt="*" title="Vis eller skjul menu" align="bottom" style="margin: 0 1ex;" /></a>
To this instead:
Code:
<a href="#" onclick="javascript:loginbox.slidedown(); return false;"><img id="upshrink" src="http://www.chihuahuaforum.dk/Themes/fg-forum/images/upshrink.gif" alt="*" title="Vis eller skjul menu" align="bottom" style="margin: 0 1ex;" /></a>
Then, inside the Table tag that follows:
Code:
<tr id="upshrinkHeader">
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
Wrap that entire table in a DIV tag:
Code:
<tr id="upshrinkHeader">
<td valign="top" colspan="2">
<div id="upshrinkHeader-alt">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
"
"
</table>
</div>
You need to find out where the closing </table> tag for the table is, and add in a closing DIV tag as highlighted above.
Finally, following the above code, initalize the script:
Code:
<script type="text/javascript">
//Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
var loginbox=new animatedcollapse("upshrinkHeader-alt", 1000, true)
</script>
Not tested, but on paper it looks like it should work.
Bookmarks