What is the advantage of using jQuery over using naked javascript?
In which cases it is better to use one, and in what other?
What is the advantage of using jQuery over using naked javascript?
In which cases it is better to use one, and in what other?
The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .
Within the framework of this question I will limit myself to the following definitions:
Javascript is a scripting language (or scripting language) running on the client side (in the browser).
jQuery is a Javascript-based library / framework. The huge popularity of jQuery is primarily due to the fact that this library solves the main problems of cross-browserism and makes it possible to solve most of the standard tasks faster and easier compared to Javascript. There are other libraries, such as Mootools.
What is better to use - depends on the specific task. There are applications for which jQuery is not suitable and scripts are written directly to Javascript or a framework is being developed. However, for most tasks, jQuery features are sufficient.
For those who are just starting to do web development, it makes sense to get acquainted with both technologies - using only jQuery, you will not learn the nuances of JavaScript, and using only JavaScript can slow down development time and lead to cross-browser compatibility problems - which are exactly solved in jQuery
PS Some statistics from W3techs: 25.2% of sites in the world do not use Javascript at all. jQuery is used by more than 72% of sites in the world, or 96.5% of sites using Javascript. For more details (other frameworks are also indicated there, some already almost forgotten): https://w3techs.com/technologies/overview/javascript_library/all
Source: https://ru.stackoverflow.com/questions/637986/
All Articles