Right now in my code I have a table being dynamically built and then the user enters some data into a field in the table. Afterwards I'd like to present the user with the opportunity to sort the list based on that field. What I'd like to do is use document.getElementsByClassName to grab all of the value fields and then sort them but maintain the object data so something like this.
var posts = document.getElementsByClassName('data');
posts.values.sort(); // I'd like to sort the array by the value of the html objects
for(i=0;i<posts.length;i++){
//modify table order
}