Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"jQuery(...)" instead of "$(...)"

Tags:

People also ask

What can we use instead of in jQuery?

A progressive JavaScript framework, Vue. js is considered a good alternative to jQuery. It is an open-source, MVVM, front-end JS framework that is considered ideal to create user interfaces and single-page apps. It is also considered good for web interfaces, desktop, and mobile app development.

Why jQuery noConflict () method is being used?

In jQuery's case, $ is just an alias for jQuery, so all the functionality is available without using $. Run $. noConflict() method to give control of the $ variable back to whichever library first implemented it. This helps us to make sure that jQuery doesn't conflict with the $ object of other libraries.

What does $() mean in jQuery?

In jQuery, the $ sign is just an alias to jQuery() , then an alias for a function. This page reports: Basic syntax is: $(selector).action() A dollar sign to define jQuery. A (selector) to "query (or find)" HTML elements.

Is jQuery discontinued?

The team announced that the cross-platform jQuery Mobile project under its umbrella will be fully deprecated as of October 7, 2021. New technologies for mobile app development have evolved since this project was launched in 2010, so we're encouraging developers to plan for this jQuery Mobile transition.


Is it a good practice to write jQuery("...") instead of $("...")?

I heard that it might be useful for avoiding future conflicts with other libraries if they use the $ as well, but is that a real-world concern? Let say I really have no idea what other libraries I'm gonna use in the future, so should I avoid writing $("...") in my scripts? Is there any other well known libraries relying on $ as well?

Also I'd love to know if there is any other issues attached to this subject.