帮帮我!!!!我有一个复杂的要求,我有一组卡片,现在点击我必须按升序对同一组卡片进行排序。一旦我制作了组卡,每次我单击排序按钮时,它都会再次对该组内的卡进行排序。
要求就像
<div class="main_div">
<div class="connectedGroup">
<div class="deck">4</div>
<div class="club">3</div>
<div class="deck">2</div>
<div class="spade">9</div>
<div class="deck">5</div>
<div class="club">7</div>
<div class="deck">5</div>
<div class="spade">2</div>
<div class="club">9</div>
</div>
</div>
排序后的输出将是
<div class="main_div">
<div class="connectedGroup">
<div class="deck">2</div>
<div class="deck">4</div>
<div class="deck">5</div>
</div>
<div class="connectedGroup">
<div class="spade">2</div>
<div class="spade">9</div>
</div>
<div class="connectedGroup">
<div class="club">3</div>
<div class="club">7</div>
<div class="club">9</div>
</div>
</div>
等待您的宝贵建议