I was not, i joogled the same question over and over again and every result said do it in js (also all of that code is either from a tutorial online or gemini)
Found the problem, was using class instead of id. I'll probably end up using the code you sent but I'll try out the stuff I tried with...