JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://jqueryui.com/ui/jquery.effects.core.js"></script>
<div id="divmsg6"><p class = 'red'>Incorrect file dimension, try again</p></div>

<button>produce me some error</button>

CSS

#divmsg6 p.red {
    display: none;
    color: red;
}

JavaScript

$('button').click(function() {
    $('#divmsg6 p.red').show(function() {
        var $this = $(this);
        setTimeout(function() {
            $this.fadeOut(1500);
        }, 2500);
    });
});