0
Here’s what I need to do: when a person clicks on an image, the display attribute of a 'ul' is changed to block, and then, when that person clicks again, the attribute value is 'None'. I wanted to take the value of the display attribute from that list to make if the value is 'block', when it clicks 'ul' the value is 'None' and it goes away.
HTML
<html>
<head>
<meta charset="utf-8"/>
<title>Teste</title>
</head>
<body>
<img src="../imagem.png" id="imagem"/>
<ul id="lista">
<li>Item de lista</li>
</ul>
</body>
Jquery
$(document).ready(function() {
$("ul#lista").css('display', 'none');
$("img#imagem").click(function() {
$("#listadostres").css('display', 'block');
})
})
It worked out! Thanks, man, I’m gonna mark it as an answer.
– Visionário