0
I’m developing a layout, I need your class in div, be randomized between two names, I need a javascript to do this, someone can help me?
Ex.:
<div class="left"><div>
<div class="right"><div>
<div class="left"><div>
<div class="right"><div>
<div class="left"><div>
<div class="right"><div>
Obs.: Remembering that I need a function to insert, as I will use this in Wordpress...
Thank you
Are you looping in PHP? If so, then it’s better to use PHP for this than JS
– Sam
Yes, in php, by wordpress...
– Nerbado
You need JS for that. Do it in PHP itself
– Sam
Show how you’re looping?
– Sam
is a simple content loop.. of Wordpress posting content
– Nerbado
You want "random" or "alternating"?
– Sam