I’m curious and hoping I can help
Have you explore to see if you could use jquery via an npm package ? Not sure if it’s supported yet, but one option.
What specifically are you unable to accomplish in Corvid? Your post said you wrote some JS to do what you want. Is it not working or do you not know how to apply it using Corvid APIs? Based on what you shared, do these not work?
I ended up solving this problem by applying a rotating banner.