<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("input").focus(function(){
$("span").css("display", "inline").fadeOut(2000);
});
});
</script>
<style>
span {
display: none;
}
</style>
</head>
<body>
<input>
<span>Nice to meet you!</span>
<p>Click in the input field to get focus.</p>
</body>
<!-- Mirrored from www.w3schools.com/jquery/tryit.asp?filename=tryjquery_event_focus_ref by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 18:06:19 GMT -->
</html>