Add class to body to randomize background via CSS
Hey all, I was hoping to get some help with this one. How would I add a class (which will be randomized) to my body tag if the initial class is either "templateCollection" or "templateProduct"?
So for example, IF my body tag looks like this:
Add a class to it:
I'm open to suggestions on this one...
<body class="templateProduct randomizeBackground">
I tried using the following type of JS, but I can't seem to get anywhere with it: