javascript/jquery modify a specific elements class height and width : I have a list of elements where I would like to modify one of the classes height and width that are not equal to a specific class.

For instance I have the element list

        let ganttRows = $('.white-grid-row');

        let classesToKeep = ['gantt_row', 'task-parent', 'white-grid-row', 'odd'];
        for (let i = 0; i < ganttRows.length; i++) {
            for (let j = 0; j < ganttRows[i].classList.length; j++) {
                if (!classesToKeep.includes(ganttRows[i].classList[j])) {
                    let className = ganttRows[i].classList[j];
                    $("." + className).css('width', 33);//changes element width not the class width
                    //modify that randomly generated class height and width ONLY FOR THIS ELEMENT.
                    //this part I'm not sure how to do.
                }
            }
        }

How can I modify the height and width of that randomly generated class?