I have a custom widget that works fine. It reads data from a custom table and displays 10 results in a widget area.
I store additional data from the query that gets the results in an array.
I want to turn each of the results that are displayed in the widget into a link that opens a modal window with the additional data.
I have the link working and the modal (CSS only) working fine.
The issue I have is how do I pass the array value, depending on which of the 10 links is clicked, to the modal code so that the correct data is displayed.
I presume I need to use data-* in the url coding and jquery to read it into the php code to display the correct array. I have spent a couple of days searching with Google but have been unable to find an easy way to do this that I can understand.
Any suggestions most welcome.