New Landing How can we help? Atelier jQuery datatables throwing TypeError conflict with themes functions.js

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Atelier
  • #254805
    bluecouches
    Member
    Post count: 23

    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' );
    #254850
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Have you installed the directory plugin?
    Thanks
    Mohammad

    #254854
    bluecouches
    Member
    Post count: 23

    I’m sorry, I’m not sure which directory plugin you’re referring to. I have the default custom post type, Directory, which is included with the theme. But I have no separate “Directory” plugins installed.

    The type error / conflict only occurs when enqueueing jQuery datatables js.

    #254856
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please live your website first to debug and resolve the issue.
    Thanks
    Mohammad

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.