What is mean by $ in jquery

Member Avatar for stbuchok

$ is the global object variable used in jQuery. $ is a valid variable name in JavaScript.

It is just a short code for the jQuery variable. So instead of writing your code:

jQuery(document).ready(function() {
.
.
.
});

You can write:

$(document).ready(function() {
.
.
.
});

Thank you,
but i want exact meaning of '$' in jquery why it is used .No other symbol used instead of $ sign

I can't answer that as I didn't develop jQuery - maybe you should go to the jQuery website and ask them.

However the $ symbol is used in programming to indicate variables in use so maybe that is why - it is calling the jQuery variable.

it's probably because jquery is really a package of javascript functions in js files so to run it you have to call the function jQuery() or $();

Member Avatar for stbuchok

I will say this again, it is the global object.

jQuery is also the global object, but to make it easier they made $ equal jQuery.

So instead of typeing jQuery('blah').click(function(){ ... }); you type $('blah').click(function(){ ... });

I'm really not sure how much clearer I can make this, I've already said this once.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.