HTML
<div class="blok1" ></div>
<div class="blok2"></div>
<div class="blok3"></div>
CSS
.blok1 {
background-color: green;
border-bottom-left-radius:15px;
border-bottom-right-radius:15px;
height: 200px;
width: 300px;
position: relative;
}
.blok2 {
background-color: blue;
border-bottom-left-radius:15px;
border-bottom-right-radius:15px;
position: absolute;
height: 200px;
width: 300px;
margin-left: 300px;
margin-top: -200px;
}
.blok3 {
background-color: purple;
border-bottom-left-radius:15px;
border-bottom-right-radius:15px;
position: absolute;
height: 200px;
width: 300px;
margin-left: 600px;
margin-top: -200px;
}
Jquery
$(document).ready(function(){
$(".blok1").hover(function(){
$('.blok1').stop().animate({'height': '400px'}, 100);
}, function(){
$('.blok1').stop().animate({'height': '200px'}, 100);
});
$(".blok2").hover(function(){
$('.blok2').stop().animate({'height': '400px'}, 100);
}, function(){
$('.blok2').stop().animate({'height': '200px'}, 100);
});
$(".blok3").hover(function(){
$('.blok3').stop().animate({'height': '400px'}, 100);
}, function(){
$('.blok3').stop().animate({'height': '200px'}, 100);
});
});
http://jsfiddle.net/dtadesigns/2263p/
When hovering the second and third div it works as intended. However, when you hover over the first div, the second and third div move along with the first one!
I have attempted various solutions but have not been able to resolve the issue.