Created
April 9, 2018 10:24
-
-
Save dajve/aab96fd02782a92d11b636ad5e96a34c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $popupIncrement = 1; ?> | |
<?php while ($objectResult) : ?> | |
<tr> | |
<td> | |
<div class="popup" onclick="myFunction(<?php echo $popupIncrement; ?>); return false;"> | |
<img src="" /> | |
</div> | |
<span class="popuptext" id="myPopup<?php echo $popupIncrement; ?>">Trigger<span> | |
</td> | |
</tr> | |
<?php $popupIncrement++; ?> | |
<?php endwhile; ?> | |
<script> | |
var myFunction = function(i) { | |
var popup = document.getElementById("myPopup"+i); | |
popup.classList.toggle("show)"; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment