Here's my code:
foreach($rows as $row)
{
echo '<div class="div-that-toggles-other-div" id="' . $row['unique_id'] .'">';
}
foreach($rows as $row)
{
echo '<div class="div-to-be-toggled" id="uid-' . $row['unique_id'] .'">';
}
The jQuery i've used to toggle the div before wont work when im printing an array of divs where i want only the specific id to open specific div.
$(".div-that-toggles-other-div").click(function () {
$(".div-to-be-toggled").slideToggle(1000);
});
how can i make it toggle depending on id?