Sorting columns
-
I am trying to sort on the timestamp column to put the most recent entries first. I am new to jquery and DataTables. I’m using a chid theme. I’ve added this to my functions.php:
function wpb_adding_scripts() { wp_register_script('sort_match_log', get_template_directory_uri() . '/js/sort_match_log', array('jquery'),'1.1', true); wp_enqueue_script('sort_match_log'); } add_action( 'wp_enqueue_scripts', 'wpb_adding_scripts' );And created a js file which looks like this:
jQuery(window).load(function () { jQuery(‘#igsv-1rTt0tr5i5D8wf8eTBmqyoqzC_LrViUpt2imdqzHpCHQ/pubhtml’).dataTable().api().order([1, 'desc']).draw(); });The website is here:
http://digitalis-darkroom.co.uk/superleague/match-log-2/
Can you tell me what I’m missing?
https://ww.wp.xz.cn/plugins/inline-google-spreadsheet-viewer/
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
The topic ‘Sorting columns’ is closed to new replies.