1
Good afternoon, I want to show you the content inside each div of this is, but I’m not getting it:
<?php
for ($i = 1; $i < 10; $i++) {
?>
<div class="cada-texto">
<a href="">titulo <?= $i ?></a>
<div class="conteudo">
texto texto <?= $i ?>
</div>
</div>
<?php
}
?>
<script type="text/javascript">
$(document).ready(function(){
$('#mostra').click(function(){
//mostra div
$('.cada-texto').show();
});
$('#fecha').click(function(){
//oculta div
$('.cada-texto').hide();
});
});
</script>
I click on the links generated by the code in php, and still show nothing.
All Divs at once?
– Sam
By clicking on it, display what’s inside
– Pedro Ribeiro
Each div has a "show" "hide" button or are only 2 boats to show or hide everything?
– Sam
I just want when I click on the link, I can see the div
– Pedro Ribeiro
on the "title" link? But Divs are already hidden?
– Sam