I'm working on an animated grid that changes the size when hovering. Here is the code pen (make sure it is in desktop mode, not mobile):
https://codepen.io/marco_lu/pen/abBmwEJ
This is the JS I used for animation:
$(".home-tile").hover(
function () {
$(this).addClass("col-lg-6");
$(this).siblings().addClass("col-lg-3");
$(".home-tile").removeClass("col-lg-4");
},
function () {
$(this).removeClass("col-lg-6");
$(this).siblings().removeClass("col-lg-3");
$(".home-tile").addClass("col-lg-4");
}
);
It works perfectly fine, but when you slide across the tiles the animation is to slow and the very right tile is not fast enough to fill the screen (you can see the yellow background).
Is there a way to force the right tile to stick to the right screen border?
Thanks