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>
4
  • 2
    did you try or search for something ? Commented Oct 9, 2017 at 16:03
  • Duplicate of stackoverflow.com/questions/10288576/… . You can solve with JQuery plugins likehttp://listjs.com/ . Learn More about this. Commented Oct 9, 2017 at 16:24
  • 3
    Possible duplicate of Sort HTML list with HTML content using JQuery Commented Oct 9, 2017 at 16:24
  • if your question is "Is it possible??" then the answer is "YES, it's possible!" Commented Oct 9, 2017 at 16:34

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.