Good day,
I can write a simple javascript snippet for this.
I am new to freelancing but if you check my work experiences, I have around 8 years of experience as a web developer.
This is just a basic task, I will surely not fail you for this task as I would want to gain reputation and transition from working full time to being a freelancer.
Cheers,
John