difference between and in jQuery

0 votes
Could someone take the effort to explain me the difference between $ and $() in jquery?

I know $() is shorthand form of $jQuery() which takes any DOM element and turns it into a jQuery object.

But what I am not sure of is what is $ and how different is it from $(). Kindly enlighten me.

Thanks heaps, Chaitanya
Jun 7, 2022 in JQuery by Edureka
• 13,690 points
660 views

1 answer to this question.

0 votes

$ sign is just a valid javascript identifier which is used as an alias for jQuery. Prototype, jQuery, and most javascript libraries use the $ as the primary base object (or function). Most of them also have a way to relinquish the $ so that it can be used with another library that uses it.

answered Jun 7, 2022 by Edureka
• 13,690 points

edited Mar 5
0 votes

this and $(this) refers to the same element. The only difference is the way they are used. 'this' is used in traditional sense, when 'this' is wrapped in $() then it becomes a jQuery object and you are able to use the power of jQuery .

answered Jun 10, 2022 by gaurav
• 23,260 points

edited Mar 5
0 votes

JavaScript: It is a major scripting programming language that is used to make websites more responsive and interactive. It is one of the pivoted parts alongside HTML and CSS which are used to create web pages. If HTML & CSS decorates and designed the web-pages so, Javascript makes the web pages dynamic(we can say it gives them life). JavaScript is a major client-side language. It’s not only confined to websites development but also used in many desktop and server programs ( Node.js is the best-known example) and Some databases, like MongoDB and CouchDB, also use JavaScript. Whenever your browser parses a web page, its responsibility is to create a tree-structure presentation in memory.

jQuery: JQuery is a framework for javaScript which developed from JavaScript. It is the most popular JavaScript library invented by John Resign and was released in January 2006 at BarCamp NYC. It is a free, open-source library and It’s a fast, concise, and rich-featured JavaScript library and also has cross-browser compatibility. The purpose of jQuery is to make life easier for the masses so that they can easily develop websites and browser-based applications using javaScript. In a concise manner, we can say that the “JQuery is a library to provide better client-side web page development” environment to the developer with the help of its feature-rich library.

  • DOM manipulation: DOM elements can be easily traversed, modified.
  • Animations Lots of built-in features for animations.
  • HTML event handling and manipulation.
  • Ajax is much simpler with an easy-to-use API that works across a multitude of browsers.
  • CSS manipulation
  • Has a high-level UI widget library.
  • Cross-browser support: work well on browsers like Chrome, Opera, etc.
  • Lightweight: Only 19kb in size.
  • And other common utilities
answered Jun 10, 2022 by rajatha
• 7,680 points

Related Questions In JQuery

0 votes
1 answer

Difference between :hidden and :not(:visible) in jQuery

During animations that hide an element, the ...READ MORE

answered Jun 14, 2022 in JQuery by gaurav
• 23,260 points
873 views
0 votes
1 answer

What is the difference between jQuery: text() and html() ?

Hello @kartik, The text() method entity-escapes any HTML that is ...READ MORE

answered Nov 25, 2020 in JQuery by Niroj
• 82,840 points
1,201 views
0 votes
1 answer

Difference between $(window).load() and $(document).ready() functions

To answer your question, the document.ready is ...READ MORE

answered Feb 23, 2022 in JQuery by Aditya
• 7,680 points
1,761 views
0 votes
1 answer

What is the difference between AJAX with JavaScript and jQuery?

JavaScript is a programming language. JQuery is ...READ MORE

answered May 30, 2022 in JQuery by gaurav
• 23,260 points
977 views
0 votes
1 answer

How to use jquery with asp.net ajax?

If you weren't aware, Microsoft is planning ...READ MORE

answered Oct 15, 2018 in IoT (Internet of Things) by Annie97
• 2,160 points
840 views
0 votes
1 answer

Is 'sparkline' a method?

I suggest you to check 2 things That jquery.sparkline.js is actually ...READ MORE

answered Nov 9, 2018 in Apache Spark by Frankie
• 9,830 points
1,465 views
0 votes
1 answer

What is jQuery?

Hey, jQuery is a fast and concise JavaScript ...READ MORE

answered Feb 14, 2020 in JQuery by kartik
• 37,520 points
1,538 views
0 votes
1 answer

Error: Global Variable is not accessable to local function

Hey kartik, A variable declared outside a function has a ...READ MORE

answered Feb 19, 2020 in PHP by Niroj
• 82,840 points
1,190 views
0 votes
1 answer

JQuery Difference between hide() and fadeOut() , show() and fadeIn()

Main difference between FadeIn, FadeOut vs hide, ...READ MORE

answered Jun 1, 2022 in JQuery by Edureka
• 13,690 points
534 views
0 votes
1 answer

addClass and removeClass in jQuery - not removing class

What happens is that your close button ...READ MORE

answered Jun 2, 2022 in JQuery by Edureka
• 13,690 points
11,260 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP