Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Meitar

    (@meitar)

    no-datatables will remove the DataTables JavaScript, which is what its sounds like you want to do. Your visual formatting should be applied via your theme’s style sheet. If you’re losing visual formatting when you apply no-datatables then you should consider restyling the table with your theme’s style.css file.

    Thread Starter jonasfer

    (@jonasfer)

    Actually want to keep the resources of Datatables , just do not want him to reorder the table when loading it.

    Plugin Author Meitar

    (@meitar)

    If all you want to do is change a column’s sort order, try using datatables_order instead. This previous thread explains that option in more detail.

    Thread Starter jonasfer

    (@jonasfer)

    Yes, I had seen and done it, but like I need an order by the date the command does not organize properly.

    Plugin Author Meitar

    (@meitar)

    I don’t think I understand what you’re trying to do. Perhaps you can “include a link to your site, so that others can see the problem,” like this forum suggests to everyone who posts something:

    Did you include a link to your site, so that others can see the problem?

    Thread Starter jonasfer

    (@jonasfer)

    Plugin Author Meitar

    (@meitar)

    Okay, but, what’s not working? Everything looks fine.

    If your issue is that the first column isn’t being sorted properly, consider reading up on DataTables custom date/time formats.

    But again, things don’t look broken. And this isn’t a DataTables forum. It is a plugin support forum; if your questions are about “how do I use DataTables?” then you need to ask those questions on a DataTables support forum.

    Thread Starter jonasfer

    (@jonasfer)

    You are right , I know I am abusing your attention and I apologize for that .
    But if you could give a simple example of where using a javascript code with your plugin would be a huge help .
    For in the forum related to datatables I think it must be able to explain all this integration , wordpress and your plugin .

    Plugin Author Meitar

    (@meitar)

    What you’re asking is still unclear to me. Also, there are examples showing JavaScript in this plugin’s FAQ. Look under the heading that reads “How do I change the default settings, like can I turn paging off? Can I change the page length? Can I change the sort order?” Here is the relevant portion:

    Alternatively, if you’re able to add JavaScript to your theme, you can do all of these things, and more because any and all DataTables-enhanced tables can be modified by using the DataTables API.

    For instance, to disable paging, add a JavaScript to your theme that looks like this:

    jQuery(window).load(function () {
        jQuery('#igsv-MY_TABLE_KEY').dataTable().api().page.len(-1).draw();
    });

    Or, to have your DataTables-enhanced table automatically sort itself by the second column in descending order:

    jQuery(window).load(function () {
        jQuery('#igsv-MY_TABLE_KEY').dataTable().api().order([1, 'desc']).draw();
    });

    (Replace MY_TABLE_KEY with the Google Spreadsheet document ID of your spreadsheet, of course.)

    Please refer to the DataTables API reference manual for more information about customizing DataTables-enhanced tables.

    Good luck.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Remove ordering and use of javascript’ is closed to new replies.