thogg4

thogg4
- Name: [not set]
- Favorite Languages: [not set]
- Website: [not set]
- Location: [not set]
- About Me: [not set]
-
HTML and Javascript - Putting it all Together
11/03/2009 - 17:06
ok, thanks for all the help.
-
HTML and Javascript - Putting it all Together
11/03/2009 - 11:17
no, it does not. it seems that the header works, but the bottom box does not collapse.
-
HTML and Javascript - Putting it all Together
11/02/2009 - 21:09
yeah thats right, i didn't include that in the question, but i do have that there. could there be another problem?
-
HTML and Javascript - Putting it all Together
11/02/2009 - 14:47
ok, then i took out the inline styles and tried to change the names but failed to make it work.
here is the code:<script type="text/javascript">
function coolSlider(elementId, headerElement)
{
var element = document.getElementById(elementId);
if(element.up == null || element.down)
{
animate(elementId, 0, 20, 150, 0, 250, null);
element.up = true;
element.down = false;
headerElement.innerHTML = 'down';
}
else
{
animate(elementId, 0, 20, 150, 130, 250, null);
element.down = true;
element.up = false;
headerElement.innerHTML = 'up';
}
}
</script>
<style>
#topbox {
position:absolute;
width:150px;
height:20px;
top:0px;
left:0px;
background: #000000;
text-align:center;
color:#FFFFFF;
border: 1px dashed #FFFFFF;
}
#bottombox {
position:absolute;
width:150px;
height:130px;
top:20px;
left:0px;
background:#FFFFFF;
overflow:hidden;
border: 1px dashed #000000;
color: 000000;
}
.bigbox {
position:relative;
width:150px;
height:170px;
top:0px;
left:0px;
}
</style>
<div class="bigbox">
<div id="topbox" onclick="coolSlider('bottombox', this);">
^^^
</div>
<div id="bottombox">
Content
</div>
</div>
Recent Comments