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:
Code:
<body class="templateProduct">
Add a class to it:
Code:
<body class="templateProduct randomizeBackground">
I'm open to suggestions on this one...
I tried using the following type of JS, but I can't seem to get anywhere with it:
Code:
<script type="text/javascript">document.getElementsByTagName('body')[0].className+=' randomizeBackground'</script>
Thanks!