Reputation: 7318
if someone just write:
$("#downloadTabs>div").each(function(el) {
el.setStyle("display", "none");
el.removeClass('active');
});
I would know what is this used for. But the actually code I read is
$$("#downloadTabs>div").each(function(el) {
el.setStyle("display", "none");
el.removeClass('active');
});
There is one more $, and what's this used for ?
Upvotes: 1
Views: 324
Reputation: 4800
The second example is not jQuery, it's MooTools. The $$ can take a CSS selector to return a set of elements just like the $ function in jQuery: http://mootools.net/docs/core/Element/Element#dollars
prototype.js also has a very similar $$ function that's a shortcut to getElementsBySelector: http://www.prototypejs.org/api/utility/dollar-dollar
Upvotes: 11
Reputation: 27323
It's probably prototype http://www.prototypejs.org/api/utility/dollar-dollar, as mentioned by James.
Yet jquery could have $$, as stated in this article:
http://onehackoranother.com/projects/jquery/jquery-grab-bag/dom-builder.html
Upvotes: 2
Reputation: 545985
It might well be that to avoid conflicts with some other library, someone working on your codebase has added a line like this:
var $$ = $.noConflict();
$$
is not mentioned in the jQuery source code as far as I can see...
Upvotes: 2