Guess what? I asked ChatGPT to write me that custom code and it not only wrote a javascript code, but it was also fully compatible with the default classes used by Webflow that doesn't show up on the Designer!