JSFiddle - React, Tailwind, and code Playground

by Ryan Mitchell

HTML

<div class="biography">
                    <p class="player-info-msg">Hover For Player Info</p>
                    <p id="moreBio">This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test.
                        <br>
                        <br>
                        <img src="http://hydra-media.cursecdn.com/dota2.gamepedia.com/b/bd/Earthshaker.png" width="256" height="144" alt="Favorite Hero">
                    </p>
                </div>

CSS

.biography {
    width: 100px;
    height: 60px;
    float: left;
    margin: 5px;
    background: #3399FF;
    color: #ffffff;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    font-weight: bold;
    font-size: 15px;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    opacity: 0.4;
    transition: all 0.6s ease;
    -webkit-transition: all 0.6s ease;
    -o-transition: all 0.6s ease;
    -moz-transition: all 0.6s ease;
}
.biography:hover {
    display: block;
    width: 350px;
    height: 450px;
    opacity: 1;
    background: #7C7C7C;
}
#moreBio {
    opacity: 0;
}
.biography:hover #moreBio {
    opacity: 1;
    transition: opacity 0.5s ease 0.5s;
    -webkit-transition: opacity 0.5s ease 0.5s;
    -o-transition: opacity 0.5s ease 0.5s;
    -moz-transition: opacity 0.5s ease 0.5s;
}

JavaScript

$('.biography').on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", function(e) {
    if ($(e.target).css('opacity') == 1) {
        $(".player-info-msg").html('Player Info');
    } else {
        $(".player-info-msg").html('Hover for Player Info');
    }
});