Upgrading jquery 1.8.3 to jquery 3.2.1

Upgrading jquery 1.8.3 to jquery 3.2.1

Hi,

We are planning to upgrade jquery from 1.8.1 to jquery 3.2.1

The following are currently in use

jquery-1.8.3.js, jquery-ui-1.9.0, jQWidgets v3.1.0

We upgraded as follows,

jquery 3.2.1.js,  jquery-ui-1.12.1, jQWidgets v5.1

After upgrade the entire look and feel of application is changed especially modal dialog stacking is completely changed. I read in a blog that z-index values are reduced from 1000s to 100s in jquery-ui-1.12.1.css.

Is there a way to updrage jquery without changing the look and feel of the existing application. Any suggestions is welcome. Thanks in advance.