I have created one div of id="modal". In this div there is a anchor tag .Inside this tag i am getting data from database .
<div id = "modal">
<a href = "javascript:void(0)" onclick = "document.getElementById('light_<?php echo $mode_id; ?>').style.display='block';document.getElementById('fade_<?php echo $mode_id; ?>').style.display='none'"><button style="border: none;color: inherit;background-color: white; font-size: 13px;"><?php echo $mode_name; ?> : <?php echo $mode_start_time; ?> - <?php echo $mode_end_time; ?>, <?php echo $mode_day_week; ?> </button></a>
</div>
Now, I want that when i clicked on anchor tag in which data is coming from database. it display the another div(id= "light_") of id light_1.and first div (modal) hide.
<div id="light_<?php echo $mode_id; ?>" class="white_content" style = "width: 300px; height: auto;" >
<div id="fade_<?php echo $mode_id; ?>" class="black_overlay"></div>
</div>