Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I changed my jQuery 1.7.2 to 3.1.1 and changed my jQuery UI from version 1.8.16 to version 1.12.1.

Quite a few of my existing JS stuff broke, like styling of buttons, and dialog behaves in unexpected manner, i.e. half of modal dialog is covered up by the mysterious <div class="ui-widget-overlay ui-front"></div>

I suspected jQuery UI to be at fault due to the covering above. I went to jQuery UI site and I see that stable version is for jQuery 1.7+.

Does that mean that I should be using jQuery 1.x with jQuery UI, or can I use jQuery 3.x okay (plus ... try to figure out why my styling and functionality broke)?

like image 820
Dennis Avatar asked Nov 08 '16 18:11

Dennis


People also ask

Is jQuery UI included in jQuery?

jQuery UI is a widget and interaction library built on top of the jQuery JavaScript Library that you can use to build highly interactive web applications.

Is jQuery UI still used?

The jQuery project is actively maintained and widely implemented — it's used by 73% of 10 million most popular websites.

What is the difference between jQuery core and jQuery UI?

jQuery is the core library. jQueryUI is built on top of it. If you use jQueryUI, you must also include jQuery. jQuery Tabs preceded jQueryUI library.


1 Answers

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.

like image 89
jeanfrg Avatar answered Oct 01 '22 15:10

jeanfrg