I have set up a loop to pull in staff bios. When a user clicks on the thumbnail of the staff member a popup with the complete bio information for that "post" should be displayed. I have been able to connect most things, but when I click on a bio, the content of the popup is always from the last post. I assume this is because the script is outside of the loop. I can't imagine that putting the script inside the loop is a good idea. Sorry, total rookie here. Can you please help me understand how I should set up the JS to display the correct information for each post?
Here is my loop code:
I appreciate any help, including the reference to other documentation. Also, since I am new on here, please let me know if you think this question could be set up differently or if you have any questions about what I am asking.