我有一个包含两列的主列表。在这些列中,每个div都有多个类,当您选择其中一个类时,我想要排列这些列以使它们均匀。这里是我开始用的一个例子:jQuery对两列内的div进行排序
<div class="left">
<div class="dot blue">blue one</div>
<div class="dot red">red one</div>
<div class="dot orange">orange one</div>
<div class="dot red">red two</div>
<div class="dot red">red three</div>
</div>
<div class="right">
<div class="dot red">red four</div>
<div class="dot blue">blue two</div>
<div class="dot blue">blue three</div>
<div class="dot blue">blue four</div>
<div class="dot orange">orange two</div>
</div>
点击拨动按钮,我对“红”之后,我想隐藏一切,除了红点,但两者之间的红色的均匀排序列。我可以正确隐藏所有内容,但不知道如何在“左”和“右”div之间制作四个红色div。这里是我想要的输出:
<div class="left">
<div class="dot red">red one</div>
<div class="dot red">red two</div>
</div>
<div class="right">
<div class="dot red">red three</div>
<div class="dot red">red four</div>
</div>
在此先感谢。
纳米小姐读... – defaultNINJA 2013-02-21 16:00:25