JqueryUi Dialog giving Uncaught TypeError: this._addClass is not a function error

Share Now


1. Always load jquery ui on footer like this

wp_enqueue_script( 'jquery-ui-script', get_template_directory_uri() . '/js/jquery-ui.min.js', array('jquery'), 1.12.1, true );

2. make sure your jquery UI code inside this block

(function($) {
    "use strict";
// A $( document ).ready() block.
$( document ).ready(function() {
//jquery UI code should be here
Picture of Nahid Mahamud

Nahid Mahamud

Web Developer | Graphic Designer | WordPress & Woo-commerce Expert