Situatie
Cu jQuery, puteți ascunde elemente HTML cu metoda hide():
Solutie
Pasi de urmat
<!DOCTYPE html>
<html>
<head>
<script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js”></script>
<script>
$(document).ready(function(){
$(“#ascunde”).click(function(){
$(“p”).hide();
});
});
</script>
</head>
<body>
<hr>
<p>Dacă faceți clic pe butonul “Ascunde”, voi dispărea.</p>
<button id=”ascunde”>Ascunde</button>
</body>
</html>
Leave A Comment?