Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/tablesort.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@

return evt;
};

var getInnerText = function(el,options) {
return el.getAttribute(options.sortAttribute || 'data-sort') || el.textContent || el.innerText || '';

var getInnerText = function(el, options) {
var sortAttribute = options.sortAttribute || 'data-sort';
if(el.hasAttribute(sortAttribute)) {
Comment thread
tristen marked this conversation as resolved.
Resolved
return el.getAttribute(sortAttribute);
}
return el.textContent || el.innerText || '';
};

// Default sort method if no better sort method is found
Expand Down