<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style type="text/css">
body {
font-size: 12px;
text-align: center;
}
div,span {
float: left;
border: 1px solid #CCCCCC;
margin: 8px;
width: 65px;
height: 65px;
}
.getFocus {
border: 1px solid #666666;
background-color: #EEEEEE;
}
</style>
<script src="../js/jquery-3.5.1.js"></script>
<script>
$(document).ready(function () {
$("#btn1").click(function () {
$("span:hidden").show("normal");
$("div:visible").addClass("getFocus");
});
$("#btn2").click(function () {
$("span:hidden").show().addClass("getFocus");
});
});
</script>
</head>
<body>
<span style="display: none">hidden</span>
<div>visible</div>
<input type="button" value="show" id="btn1">
<input type="button" value="addclass" id="btn2">
</body>
</html>