我是 JQuery 的新手,我正在寻找一种方法来对我完全使用 div 而没有表结构创建的表进行排序。我对行有相同的 id,因为我认为我可以找到一种方法来做到这一点。这是我的代码:
<div class="column_title">Column 1</div>
<div class="column1">
<div class="each_column">
<span class="column1_class" id="row1">Value 1</span>
</div>
<div class="each_column">
<span class="column1_class" id="row2">Value 2</span>
</div>
<div class="each_column">
<span class="column1_class" id="row3">Value 3</span>
</div>
<div class="each_column">
<span class="column1_class" id="row4">Value 4</span>
</div>
</div>
</div>
<div class="column_title">Column 2</div>
<div class="column2">
<div class="each_column">
<span class="column2_class" id="row1">Value A</span>
</div>
<div class="each_column">
<span class="column2_class" id="row2">Value B</span>
</div>
<div class="each_column">
<span class="column2_class" id="row3">Value C</span>
</div>
<div class="each_column">
<span class="column2_class" id="row4">Value D</span>
</div>
</div>
<div class="column_title">Column 3</div>
<div class="column1">
<div class="each_column">
<span class="column3_class" id="row1">Value AA</span>
</div>
<div class="each_column">
<span class="column3_class" id="row2">Value AB</span>
</div>
<div class="each_column">
<span class="column3_class" id="row3">Value AC</span>
</div>
<div class="each_column">
<span class="column3_class" id="row4">Value AD</span>
</div>
</div>
作为新手,我不确定如何解决这个问题。我必须使用 div 结构,所以关于如何去做的任何指导?