Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8287403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:01:47+00:00 2026-06-08T12:01:47+00:00

All, I’m using the following theme which utilizes the datatable plugin: http://revaxarts-themes.com/whitelabel/datatable.html Things work

  • 0

All,
I’m using the following theme which utilizes the datatable plugin:

http://revaxarts-themes.com/whitelabel/datatable.html

Things work great except for one thing. I’m trying to sort my table in descending order on the first column when it loads. Currently it only sorts it in Ascending order. Here is a JS Fiddle that has the JS file that is included in theme:

http://jsfiddle.net/nHejP/

I found this line in there (line 1077 on that):

/*
* Variable: aaSorting
* Purpose:  Sorting information
* Scope:    jQuery.dataTable.classSettings
* Notes:    Index 0 - column number
*           Index 1 - current sorting direction
*           Index 2 - index of asSorting for this column
*/
this.aaSorting = [ [0, 'asc', 0] ];

I changed this to the following value:

this.aaSorting = [ [0, 'desc', 0] ];

This still sorts my initial column in ascending order. Is there another value that I have to set?

Thanks for any help in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:01:49+00:00Added an answer on June 8, 2026 at 12:01 pm

    Have you looked through the docs of datatable here. Instead of modifying the original sourcecode, you should pass in the sort order when you first initialize datatable.

    You can pass in the sort order using the aaSorting property like so

    $(document).ready(function() {
        $('#example').dataTable( {
            "aaSorting": [[ 0, "desc" ]]
        } );
    } );
    

    jsFiddle Here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, In Apple's sample code DateCell http://developer.apple.com/library/ios/#samplecode/DateCell/Introduction/Intro.html the ivar pickerView is declared in MyTableViewController.h
All, I'm going to use a QR code from the following URL: http://qrcode.kaywa.com/ I
All, If I run a query like the following: $qry = Select wrong_column from
All, If I've go the following database fields/values: user_id field_name field_value 1 EventHour1 1
All my files can be found on GitHub: https://github.com/Integralist/Passage (just in case you need
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
All, Say I have the following bit of code: select: function(start, end, allDay) {
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
All, I am building a small site using PHP. In the site, I receive
All, I have the following code: $fetch = mysql_query(SELECT * FROM calendar_events where event_status='booked'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.