Dit accordeon menu werkt met jQuery. Download de nieuwste versie en upload hem naar je server.
Java Script library voor in de :<script src="javascript/jquery-1.2.3.js"
type="text/javascript"></script>
Voorbeeld HTML<ul>
<li>
<a id="whatever">
<img src="images/blaat.png" />
<p>
<strong>MovieShocker.com</strong><br/>
Watch all your favorite movies online for free.
</p>
</a>
</li>
<li>
<a>
<img src="images/blaat.png" />
<p>
<strong>How to watch movies?</strong><br/>
Click here to find out how to watch everything.
</p>
</a>
</li>
<li>
<a>
<img src="images/blaat.png" />
<p>
<strong>Contact</strong><br/>
Want to contact us?
</p>
</a>
</li>
</ul>
CSS:ul{
list-style: none;
margin: 0;
padding: 0;
}
ul li{
float: left;
padding: 10px;
display: block;
margin-right: 10px;
}
ul li a{
display: block;
overflow: hidden;
height: 75px;
width: 75px;
}
#whatever{
width: 210px;
}
ul li img{
position: absolute;
border: 3px solid #881212;
}
ul li p{
margin: 0;
padding: 0;
width: 120px;
display: block;
margin-left: 85px;
}
jQuery voor in de :<script type="text/javascript" >
$(document).ready(function(){
lastBlock = $("#a1");
maxWidth = 210;
minWidth = 75;
$("ul li a").hover(
function(){
$(lastBlock).animate({width: minWidth+"px"}, { queue:false, duration:400 });
$(this).animate({width: maxWidth+"px"}, { queue:false, duration:400});
lastBlock = this;
}
);
});
</script>
Dont forget to say thank you! 