Some jquery plugins not working with the new version of jquery library

I have a question about jQuery plugins. I use the plugin to check the box, the plugin using jQuery lib version 1.4.2, and it works fine. But when I upgraded to jquery 1.7.1, my bad one, it does not work, also there are no errors in the console.

The above problem encountered so many times that I decided to use the same jquery file with the plugin. But now I have much more effects on my web page and they use the latest versions of jquery, maybe I can not put it back to the old one

I am new to jquery, if so, it will be too difficult to debug what happens. Any good solutions for this, in the future I will have to use jQuery? What are all the update rules ?.

+6
source share
3 answers

In my experience, the most significant change from 1.4 to 1.7, which could lead to code breaking, was the introduction of jQuery 1.6 from .prop() to replace some (incorrect) uses of .attr() .

Take a look at all the calls to .attr() and see if they should be replaced with .prop() .

For guidance on use, refer to http://appendto.com/blog/2011/05/jquery-161-release-executive-brief

+4
source

I had the same thing with jQuery plugins (especially with jQuery Tools) that required the old jQuery version to work properly.

Sorry, but I suggest using plugins that require an old version of something, and do a few google searches for some of the effects that you are going to use. Newer versions of jQuery have newer and added effects, and the jQuery UI plugin also adds many new effects and transitions that may interest you.

If jQuery Tools or something similar using an older version of jQuery, there is probably a better and newer version made by someone else somewhere on the Internet.

Good luck

0
source

I am new to jquery, if so, it will be too difficult to debug what happens. Any good solutions for this, in the future I will have to use jQuery? What are all the update rules ?.

For this part, you can go for a trial and error procedure, just place the jQuery sources and make sure that you perform some regression tests, this will ensure that all plugins work, and only after that go to dev / production using the new version of jQuery.

As for the new effects. Any new effect is basically the sum of the previously entered effects, so basically you have everything, maybe you should port some plugins to a newer version of jQuery as soon as you hang it up, or why not try to implement these plugins yourself.

EDIT:

on the jquery website you can check the API and it will be displayed for each signature of the API method in the version in which it was introduced.

0
source

Source: https://habr.com/ru/post/910587/


All Articles