4 ms·
<table class="sortable"> Adding the “sortable” class to a <table> element provides support for sorting by column value. Clicking the column headers will sort t
by at-fates-hands 7y ago
<table class="sortable">
Adding the “sortable” class to a <table> element provides support for sorting by column value. Clicking the column headers will sort the table rows by that column’s value. Tables must use <thead> and <th> tags for sortable functionality to work.
- wnevets 7y agoI'm assuming that is with this react project. The OP was asking why this project is needed at all.
- akdor1154 7y agoThe hell? Did you copy and paste this from WordPress docs? That has nothing to do with native html functionality.
- lowboy 7y agothis is not native browser behaviour and will only work if you include a JS lib that provides this functionality based on a classname of "sortable"
- nkrisc 7y agoNow that your <table> element has the class "sortable," what are you going to do to actually make it sortable?
- ajanuary 7y agoThis is a copy and paste of the snippet google shows from https://www.bu.edu/tech/services/cccs/websites/www/wordpress/how-to/sortable-searchable-tables/# https://www.bu.edu/tech/services/cccs/websites/www/wordpress... if you search for “sortable table”. The page is actually talking about how to author pages on their Wordpress site, which presumably uses a wordpress plugin to provide the JavaScript necessary to make this work.