2
Hello.
How do I get this div to be hidden when I click out of it:
I need her gone when I click out of her.
Follow a similar example:
$("body").on("click", function() {
$(".passageiros-div").slideUp("slow/400/fast");
});
.passageiros-div {
border: 1px solid #000;
}
<!DOCTYPE html>
<html>
<head>
<title>Teste</title>
</head>
<body>
<div class="passageiros-div">
<p>Titulo</p>
</div>
<div>
<h1>Frase de Teste</h1>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.1/jquery.min.js"></script>
</body>
</html>
Notice that when I click inside of it too, I needed it to disappear only when I click outside of it.
Does anyone know how to do this with jQuery?
Opa speaks there, so man, tries to put the title of your question more descriptive, also tries to put the HTML code to make it easier for people to play.
– JuniorNunes