I need help with Jquery below ... I need every% of% of each% of% to show <div id="flip"></div>
.
However, the way it is, it only works with the first div content ... on the second when you click nothing happens .. can anyone help me?
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><script>$(document).ready(function(){$("#conteudo").each(function() {
$("#flip").click(function(){
$("#panel").slideToggle("slow");
});
});
});
</script>
<style>
#panel, #flip {
padding: 5px;
text-align: center;
background-color: #e5eecc;
border: solid 1px #c3c3c3;
}
#panel {
padding: 50px;
display: none;
}
</style>
</head>
<body>
<div id="conteudo">
<div id="flip">Click to slide the panel down or up</div>
<div id="panel">Hello world!</div>
</div>
<div id="conteudo">
<div id="flip">Click to slide the panel down or up</div>
<div id="panel">Hello world!</div>
</div>
</body>
</html>