Extra info onder elk item laten verschijnen met een button.
- SanThe -
27/03/2017 18:53:04Code (php)
1
2
3
4
2
3
4
<?php
echo '<tr><td><input type="button" onclick="document.getElementById(\'productInfoPopup' . $i . '\').style.display=\'block\'" value="Meer info"></button></td></tr>';
echo '<tr><td><div class="hideMe" id="productInfoPopup' . $i . '"><h4>Product Informatie</h4><p>'.$row['description'].'</p><div class="closeMe" id="closeMe' . $i . '"><a href="#" onclick="document.getElementById(\'productInfoPopup' . $i . '\').style.display=\'none\'">X</a></div></div></td></tr>';
?>
echo '<tr><td><input type="button" onclick="document.getElementById(\'productInfoPopup' . $i . '\').style.display=\'block\'" value="Meer info"></button></td></tr>';
echo '<tr><td><div class="hideMe" id="productInfoPopup' . $i . '"><h4>Product Informatie</h4><p>'.$row['description'].'</p><div class="closeMe" id="closeMe' . $i . '"><a href="#" onclick="document.getElementById(\'productInfoPopup' . $i . '\').style.display=\'none\'">X</a></div></div></td></tr>';
?>