how do i add plug-ins

how do i add plug-ins

burningflamesburningflames Posts: 9Questions: 0Answers: 0
edited April 2009 in Plug-ins
Hi Allan,

Noob question : how do i add plug-ins into my code ??

Do i just copy them into datatable js file and use them as per usage directions ?? Do I need to add the function name somewhere else ??

Thanks

Replies

  • allanallan Posts: 61,452Questions: 1Answers: 10,055 Site admin
    Hi burningflames,

    Here is an example of how to add an API plug-in function: http://datatables.net/examples/example_plugin_api.html
    And there is one showing custom type detection and sorting: http://datatables.net/examples/example_sorting_plugin.html

    You can put the plug-in functions anywhere in your script file(s) _after_ the DataTables code.

    Does that help?
    Allan
  • DunhamzzzDunhamzzz Posts: 11Questions: 0Answers: 0
    But how is the plugin activated? I've included the "Hidden title numeric sorting" plugin code on a JS file and included it but how do I get a column to sort using said plugin?
  • allanallan Posts: 61,452Questions: 1Answers: 10,055 Site admin
    You need to set the sType for the column to match the sorting plug-in type: "title-numeric" in the case of the hidden title one.

    To do this, please see the documentation: http://datatables.net/usage/columns#sType

    Regards,
    Allan
This discussion has been closed.