jQuery UI Widgets Forums Getting Started WordPress Admin JQuery Conflicts

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 9 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • WordPress Admin JQuery Conflicts #71664

    cpuzzuol
    Participant

    I am using JQWidgets 3.8.0 within a custom WordPress (v. 4.2.2) plugin, namely the jqxDataTable feature. Within my plugin I have the following function:

    public static function cp_libstaff_load_javascript(){
    ?>
    <script>
    jQuery(document).ready(function ($) {
    jQuery(“#emu_libstaff_staff_table”).jqxDataTable(
    {
    altRows: true,
    sortable: true,
    editable: true,
    selectionMode: ‘singleRow’,
    columns: [
    { text: ‘First Name’, dataField: ‘First Name’, width: 200 },
    { text: ‘Last Name’, dataField: ‘Last Name’, width: 200 },
    { text: ‘Product’, dataField: ‘Product’, width: 250 },
    { text: ‘Unit Price’, dataField: ‘Price’, width: 100, align: ‘right’, cellsAlign: ‘right’, cellsFormat: ‘c2’ },
    { text: ‘Quantity’, dataField: ‘Quantity’, width: 100, align: ‘right’, cellsAlign: ‘right’, cellsFormat: ‘n’ }
    ]
    });
    });
    </script>
    < ?php
    }

    add_action( ‘admin_footer’, array( ‘Libstaff_Admin’,’cp_libstaff_load_javascript’) );

    This function essentially breaks the pulldown menus in the WordPress admin area. For example, on the widgets admin page, the active sidebar menus will not expand unless I comment out

    jQuery(“#emu_libstaff_staff_table”).jqxDataTable

    I know JQWidgets is supposed to be compatible with WordPress so any ideas where the conflict is coming from?

    WordPress Admin JQuery Conflicts #71668

    Dimitar
    Participant

    Hello cpuzzuol,

    Please make sure you are using the latest version of jQWidgets (3.8.0) and that you have followed the How to Use jQWidgets in WordPress tutorial when integrating jqxDataTable in your project. If the issue persists, please share the errors thrown in your browser’s console.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.