Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82121

how to sort column when it contains markup

$
0
0
hello all,

I am using DataTables and loving it so far. Why didn't I know about this great plugin before? :)

I am stuck on a problem where I have a column that contains markup. The markup represents a progress bar and I would like to be able to sort by it. Can someone please help?

These are the 3 possible values that can be in the TD I want to sort:

<div class="progress progress-success"><div class="bar" style="width: 100%"></div></div>
<div class="progress progress-warning"><div class="bar" style="width: 66%"></div></div>
<div class="progress progress-danger"><div class="bar" style="width: 33%"></div></div>


Is there a way I can make this column sortable based on the markup you see above?

Any help is highly appreciated. Thanks!

Viewing all articles
Browse latest Browse all 82121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>