0

In section one, I have the HTML code of row records. If I want to write javascript or jquery to reorganize the HTML code to have the sorting effect on the row record by title, is it possible? I want to sort below records by label title if I have the HTML that generated dynamically. Is it possible??

Section one

   <div id="listOfRecords">
        <div class="search list">
            <div class="row">
               <label id="title">FGH item</label>
            </div>
            <div class="row">
                <label id="title">ABC item</label>
             </div>
         </div>
         <div class="search list">
             <div class="row">
                 <label id="title">CDE item</label>
             </div>
         </div>
    ...................
    </div>

Section two: Expected Result

<div id="listOfRecords">
    <div class="search list">
        <div class="row">
            <label id="title">ABC item</label>
         </div>
..................
         <div class="row">
             <label id="title">CDE item</label>
         </div>
.....................
         <div class="row">
           <label id="title">FGH item</label>
        </div>
....................
     </div>
</div>
Iman Bahrampour
  • 6,180
  • 2
  • 41
  • 64
AMMA
  • 121
  • 1
  • 10

0 Answers0