Change function to figureClassAdd and add .each iteration with hasClass evaluation as it wasn't evaluating class correctly previously