Currently, I have 2 divs set up like this:
<div id="content">
Content 1
</div>
<div id="rollover-content" style="display: none;">
Content 2
</div>
I am trying to achieve a 'slide up' transition effect on the #rollover-content div when the mouse hovers over the #content div. And when the mouse leaves the #content div, I want the #rollover-content div to slide back down.
If you visit this demo and hover over the first tile, you will see the desired effect. However, I would like to implement it using pure jQuery.
In order to create a visually appealing card design, I have created the following CSS class:
.card {
position: relative;
margin: 0.5rem 0 1rem 0;
background-color: #F1F1F1;
transition: box-shadow .25s;
border-radius: 2px;
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);
padding: 20px;
}
How can I apply these transitions within a div that has this wrapping card class?