Soldato
I have the below function that adds an onclick event to a set of list items with the 'LoadConfigureAppModal' class. Now the function works in that upon click of any of these items with this class that the style changes be visible (loads the modal). The next part is that I want to run a function after the modal is loaded that grabs the value for that particular list items 'data-AppId' attribute and populate the modal with the relevant content.
I've got the following but not sure how to get it working, or if there is a better way.
I've got the following but not sure how to get it working, or if there is a better way.
HTML:
for(var i=0; i<loadConfiureAppModal.length; i++) {
loadConfiureAppModal[i].onclick = function() {
configureAppModal.style.display = "block";
getAppDetails(document.getElementsByClassName("LoadConfigureAppModal")[i].getAttribute('data-AppId'));
}
}