Slide up panel multiple divs
by Akram kamal
HTML
<div id="container">
<a href="#" class="link">Panel 1
<div id="slideup" class="panel">
<p>Some text here</p>
</div>
</a>
<a href="#" class="link">Panel2
<div id="slideup" class="panel">
<p>Some text here</p>
</div>
</a>
<a href="#" class="link">Panel3
<div id="slideup" class="panel">
<p>Some text here</p>
</div>
</a>
</div>
CSS
body,
hotm {
width: 100%;
}
#container {
display: block;
clear: both;
}
#container a {
display: inline-block;
clear: none;
border: 1px solid #000;
width: 30%;
height: 200px;
overflow: hidden;
position: relative;
}
#slideup p {
display: block;
clear: none;
width: 80%;
height: 100px;
margin-left: auto;
margin-right: auto;
text-align: left;
color: #fff;
}
#slideup {
display: block;
background-color: rgba(0, 0, 0, 0.4);
border: 1px solid #000;
position: absolute;
overflow: hidden;
bottom: 0px;
height: 15%;
width: 100%;
}
JavaScript
$(document).ready(function() {
$('.link').mouseenter(function() {
$('.panel',this).animate({
height: "70%"
});
});
$('.panel').mouseleave(function() {
$(this).animate({
height: "15%"
}, 900, function() {});
});
});