Cannot load datatools in wordpress

Cannot load datatools in wordpress

tsmprittsmprit Posts: 10Questions: 3Answers: 0

Hi, for first, sry for my english, but ill try to do my best

Datatables are working perfectly in wordpress right now.
The problem is when comes to datatools, i cant figure out how load this extension with wordpress.
Chrome debug tool show some error: Uncaught TypeError: Cannot read property 'TableTools' of undefined
I dont know where to start, can anyone help me with that? Thaanks

footer.php
jQuery(document).ready(function() {
jQuery('#example').DataTable( {

} );
} );

functions.php

function my_scripts_method1() {
wp_enqueue_script(
'custom-script1',
get_stylesheet_directory_uri() . '/js/dataTables.tableTools.js',
array( 'jquery' )
);
}

add_action( 'wp_enqueue_scripts', 'my_scripts_method1' );

function my_scripts_method2() {
wp_enqueue_script(
'custom-script2',
get_stylesheet_directory_uri() . '/js/jquery.dataTables.js',
array( 'jquery' )
);
}

add_action( 'wp_enqueue_scripts', 'my_scripts_method2' );

This discussion has been closed.