Can I use jQuery UI 1.12.1 with jQuery 3.x?

Solution 1:

jQueryUI supports the following jQuery version range:

"dependencies": {
    "jquery": ">=1.7.0 <4.0.0"
},

I'd say you're good to go.

Source: https://github.com/jquery/jquery-ui/blob/master/package.json#L49

It might be that you're seeing a lot of broken components because either you're not importing their CSS or you're overriding their CSS.

Solution 2:

Can you use jQuery-UI with jQuery 3.2.1 ?

Imho you can not without having serious problems. See the given example below.

Assume the following configuration:

  • jQuery 3.2.1 (CDN)
  • jQuery UI 1.12.1 (CDN)
  • Detection jQ Migrate 3.0.0 for error detection.

I get the following errors:

  • jQuery.expr[":"] is now jQuery.expr.pseudos in jquery-ui.min.js
  • jQuery.expr.filters is now jQuery.expr.pseudos in query-ui.min.js
  • jQuery.unique is deprecated, use jQuery.uniqueSort