tristen / tablesort

:arrow_up_down: A small tablesorter in plain JavaScript
https://tristen.ca/tablesort/demo/
MIT License
1.1k stars 179 forks source link

Can't get table element with div(display:table) #212

Closed carry0987 closed 3 years ago

carry0987 commented 3 years ago

I've a table element like the following:

    <div id="table">
        <div class="table-row head">
            <div class="text">
                <div class="text">
                    <div class="text">Name</div>
                    <div class="text">Email</div>
                    <div class="text">Birthday</div>
                </div>
            </div>
        </div>
        <div class="table-row body">
            <div class="text">
                <div class="text">
                    <div class="text">Jack</div>
                    <div class="text" title="test@example.com">test@example.com</div>
                    <div class="text">January 14, 1996</div>
                </div>
            </div>
        </div>
    </div>

Can tablesort use some specific class name to serve as thead, tbody, tr, th, td ? Like:

table-row.head => thead
table-row.body => tbody
table-row => tr
...etc