Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(document).ready(function() {
- $('#display-info').click(function() {
- $('#info-container').toggle();
- });
- })
- </script>
- <table>
- <thead>
- <tr>
- <th>Name</th>
- <th>Date</th>
- <th>Options</th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach ($resource as $result)
- {
- ?>
- <tr>
- <td><?php echo $result['name']; ?></td>
- <td><?php echo $result['date']; ?></td>
- <td><img src="../images/display-info" id="display-info"></td>
- </tr>
- <tr id="info-container" style="display: none;">
- Here comes all the info I need to display when the user click on the display-info icon.
- </tr>
- <?php
- }
- ?>
- </tbody>
Advertisement
Add Comment
Please, Sign In to add comment