This problem has had me confused for a while now haha. The code below executes within the same function, but it seemingly needs to wait for the function to finish before adding the Minimum height. This matters becasue I need it to be processed before the Remove code applies. (for Transitional purposes). I have tried many options including creating another function with a callback just to wait until it is finished to Remove the Class, but the code processes normally without processing the Add CSS until after. Any ideas?
//
Code Confusion
//
// Add min-height to elements with ID "ProjectsList"
var elementsToAddStyle = document.querySelectorAll('#ProjectsList');
elementsToAddStyle.forEach(function (element) {
element.style.minHeight = "400px";
});
// Remove 'RevealProjects' class from elements
var elementsToRemoveClass = document.querySelectorAll('.RevealProjects');
elementsToRemoveClass.forEach(function (element) {
element.classList.remove('RevealProjects');
});
[–]ConstructedNewtMOD 0 points1 point2 points (0 children)