我有一系列看起来像这样的生成产品
<div class="product"><div class="productImage" title="one"></div></div>
<div class="product"><div class="productImage" title="two"></div></div>
<div class="product"><div class="productImage" title="three"></div></div>
<div class="product"><div class="productImage" title="four"></div></div>
有没有办法可以将它们放在一个数组中以使用 javascript 以不同的顺序显示它们?
想不通。有什么建议吗?
what I have right now
<div class="product">
<div class="productImage" title="Elixer Altima">product image goes here with other shopping features</div>
</div>
<div class="product">
<div class="productImage" title="Bain Oleo Relax">product image goes here with other shopping features</div>
</div>
<div class="product">
<div class="productImage" title="Satin">product image goes here with other shopping features</div>
</div>
<div class="product">
<div class="productImage" title="Hair Cream">product image goes here with other shopping features</div>
</div>
New Order to be
<div class="product">
<div class="productImage" title="Hair Cream">product image goes here with other shopping features</div>
</div>
<div class="product">
<div class="productImage" title="Satin">product image goes here with other shopping features</div>
</div>
<div class="product">
<div class="productImage" title="Bain Oleo Relax"></div>
</div>
<div class="product">
<div class="productImage" title="Elixer Altima">product image goes here with other shopping features</div>
</div>