I am working with a list of items displayed as <li>
elements in a loop. When one of these elements is clicked, I would like a modal box to open up displaying specific content related to that particular element.
The following data represents the items in the list:
{value: 10, name: "foo"},
{value: 12, name: "bar"},
{value: 14, name: "foobar"},
{value: 22, name: "test"},
{value: 1, name: "testtooo"},
{value: 8, name: "something"}
Upon clicking an element, I would like to view the corresponding value
property inside the modal box.
To see how this functions, I have created a fiddle here: https://jsfiddle.net/hvb9hvog/14/
Inquiry
I have successfully implemented the modal feature, but I am unsure how to display the value
property of each individual element within the modal itself. Can anyone provide guidance on achieving this?