Hey there, I’m using the jQuery plugin Datatables, which, when enqueued, is causing a type error / conflict with functions.js. I’ve included the error below, as well as my enqueue of the datatables script. This conflict breaks nearly all javascript in the theme, but datatables seems to work. I’ve tried lowering the priority of the load of data tables, but that seems to cause different errors. Please let me know if there is a way to get around this. Thanks! (I’m working on a local install currently, so I can’t provide login details.)
TypeError: jQuery('#sf_directory_calculate_coordinates').live is not a function. (In 'jQuery('#sf_directory_calculate_coordinates').live', 'jQuery('#sf_directory_calculate_coordinates').live' is undefined)
directorySubmitfunctions.js:1190
initfunctions.js:143
initfunctions.js:6090
idatatables.min.js:13:27070
fireWithdatatables.min.js:13:27829
readydatatables.min.js:13:29632
Jdatatables.min.js:13:29811
function data_tables_scripts() {
wp_enqueue_style( 'chosen-css', 'https://cdn.datatables.net/t/bs/jq-2.2.0,dt-1.10.11,b-1.1.2,b-print-1.1.2,r-2.0.2/datatables.min.css');
wp_enqueue_script( 'chosen-js', 'https://cdn.datatables.net/t/bs/jq-2.2.0,dt-1.10.11,b-1.1.2,b-print-1.1.2,r-2.0.2/datatables.min.js', 'jQuery');
}
add_action( 'wp_enqueue_scripts', 'data_tables_scripts' );