<button id="test" onclick="javascript:hideMe1()" type="button">Close Me!</button>
function hideMe1(){
$( "#test" ).delay( 1 ).fadeOut("slow", function () {$(this).css({display:"none"});});
}

/* //here another one. you dont need jQuery for this one
function hideMe1(){
document.getElementById("test").style.display = "none";
}
*/

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js