0

If i have formed html with divs Here example

          <div>            
            <a href='#' class='auction-position block'>
                <div class='company-logo block'>Sort By Name</div>
                <div class='company-data block'>Sort By ID</div>
                <div class='auction-information block'>
                    <div class='auction-date block'>Sort By Date</div>
                    <div class='amount-days block'>Sort By Km</div>
                </div>
                <div class='amount-lots block'>Sort By Amount</div>
                <div class='rates block'>
                    <time datetime='00:00:26444641'>Sort By Time</time>
                </div>
                <div class='clear'></div>
            </a>
           </div>

How To sort divs by pressing on "Sort By .." ? It is possible to do wiht Javascript or jquery?

Dmitrij Holkin
  • 1,995
  • 3
  • 39
  • 86
  • 1
    I have written an answer for a similair question http://stackoverflow.com/questions/31390227/sorting-elements-with-jquery-using-data-attributes/31390513#31390513 Please have a look, it might be useful. – halfzebra Jul 15 '15 at 12:40
  • Yes man thanks that is what i need. So if you write the answer here i will acept – Dmitrij Holkin Jul 15 '15 at 12:48

1 Answers1

1

you can change that into a table and use DataTables jquery plugin. https://www.datatables.net/

Here is and example of the javascript

    $(document).ready(function() {
        $('#table_id').DataTable({
           false,
           false, 
           false
        });
    } );
Stelium
  • 1,207
  • 1
  • 12
  • 23