Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Reorganize coinMarketCap Top20 by volume and negative change
javascript:(function(){
tbody = $('#currencies_wrapper').find('tbody');
tbody.children()
.each( function(index, item){
if( index >= 20 )
item.remove();
});
tbody.find('tr')
.sort( function( itemA, itemB ){
percentItemA = parseFloat( $(itemA).find('.percent-24h').text() );
percentItemB = parseFloat( $(itemB).find('.percent-24h').text() );
if( percentItemA > percentItemB )
return 1;
else
return -1;
})
.appendTo(tbody);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.