I've been trying to make this menu on my website, and the first step is making it expanding when clicking it. Every picture is separate but in the same div. How should I do this in the best way?
<script src="jquery-1.11.3.min.js"></script>
<link rel="stylesheet" type="text/css" href="index.css">
<body>
<div id="prototype">
<img style="height: 100px; width: 100px; position: absolute;"src="prototype1.png" alt="menu1">
<img style="height: 100px; width: 100px;position: absolute;" src="prototype2.png" alt="menu2">
<img style="height: 100px; width: 100px;position: absolute;" src="prototype3.png" alt="menu3">
<img style="height: 100px; width: 100px;position: absolute;" src="prototype4.png" alt="menu4">
<img style="height: 100px; width: 100px;position: absolute;" src="prototype5.png" alt="menu5">
<img style="height: 100px; width: 100px;position: absolute;" src="prototype6.png" alt="menu6">
</div>
My jQuery so far
$("#prototype").one('click', function(){
$(this).fadeOut(400).fadeIn(400).fadeOut(400).fadeIn(400).animate({
'width': '+=400px',
'height': '+=700px'}, "slow");
});
And then my CSS:
#prototype {
position: absolute;
top: 45%;
left: 47.5%;
}
Unfortunately this is how it ends up looking like.