FadeIn on Hover | CSS & jQuery Way

fadein div when hovering its parent element

HTML

<center>
<h1>The CSS Way</h1>

<div class="post">
    <img src="http://placekitten.com/300/300">
    <div class="post-info">
        <div class="post-info-inside">
            <p>Post Title</p>
            <p>The path of the righteous man is beset on all sides by the iniquities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy My brothers.</p>
        </div>
    </div>
</div>

<h1>The jQuery Way</h1>

<div class="project">
    <a href="#">
        <img src="http://placekitten.com/400/400">
        <span class="info">
            <span class="text">
                <span class="title">Swyndle &amp; Hawks</span>
                <span class="year">2011</span> 
                <span class="type">Website</span>
            </span>
        </span>
    </a>
</div>



</center>

CSS

h1 { font-size: 30px; margin-bottom: 15px; margin-top: 15px; background: yellow; font-family: serif; text-decoration: underline }

.post {
    margin-right: 30px;
    margin-bottom: 30px;
    position: relative;
    height: 300px;
    width: 300px;
}

.post-info {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    opacity: 0;

  -moz-transition: opacity 1s ease-out; 
     -webkit-transition: opacity 1s ease-out; 
  -o-transition: opacity 1s ease-out;     
   transition: opacity 1s ease-out; 

  /*   -moz-transition-delay: 0.05s;
    -webkit-transition-delay: 0.05s;
    -o-transition-delay: 0.05s;
    transition-delay: 0.05s;  */
}

.post-info-inside {
    height: 100%;
    overflow: hidden;
    background: rgb(255, 255, 255); /* fallback */
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
}

.post:hover > .post-info {
    opacity: 1;
    height: 100%;
}


.project {
height: 400px;
width: 400px;
overflow: hidden;
position: relative;
}


.info {
position: absolute;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
background: rgba(0, 0, 0, .9);
color: white;
display: none;
}

.info .text {
overflow: hidden;
}

JavaScript

var mouseover = function() {
        $(this).find('.info').fadeIn(200);
    };
    
    var mouseout = function() {
        $(this).find('.info').fadeOut(200);    
    };
    
    $('.project a').hover(mouseover, mouseout);