I am trying to make dynamic button thing where the selected section will enlarge when button is pressed.
.php
<?php
while($row = $results->fetch())
{
?>
<section class="rss-container">
<p class="rss-desc">
<?php
echo '<div class="dmitri" id="d'.$row['id_ilmoitus'].'">'.$row['popup'].'</div>';
echo '<div class="vladmir" id="v'.$row['id_ilmoitus'].'">'.$row["teksti"].'</div>';
?>
</p>
<br />
<span class="rss-badge more no-underline" id="button_<?php echo $row['id_ilmoitus'] ?>">Laajenna</span>
</section>
<br />
<?php
}
?>
.jquery
$('.vladmir').hide();
$('.rss-badge').click(function(){
$('d'+ ? ).toggle();
$('v'+ ? ).toggle();
});
I have no idea how to $row['id_ilmoitus] there. I tried to make it as variable but didnt work.
Sorry for being unclear.