Alex Rivera | Logout

What is the difference between $ and $$?

Asked 2012-12-18T12:35:50.377
18

I have been going through some jQuery functionality.

Can any one please give me some idea of what the difference is between the use of $ and $$?

Edit
Report

1 Answer

5

jQuery is an object provided by jQuery. $ is another, which is just an alias to jQuery.

$$ is not provided by jQuery. It's provided by other libraries, such as Mootools or Prototype.js.

More importantly, $$ is also provided in the console of modern browsers as an alias to document.querySelectorAll. Except if it's overridden by another library. $ is also provided in the same way, as an alias to document.querySelector.

See this answer for more information.

answered 2012-12-18T12:48:23.287

Your Answer