Mootools 的 $$ 是 jQuery 的 $ 的同义词吗?

Is Mootools' $$ a synonym of jQuery's $?

我认为 jQuery 的 $ 功能非常方便。我知道 MooTools returns 是一个 Elements 实例,但是 作为 select 或 有具体的区别吗?你能 select Dom 树上的任何节点吗?

Mootools 从 $$$ 这两个函数开始,然后他们删除了第一个(他们保留了一个别名,所以你也可以使用 $)以支持 document.id$$ 可以完全用作 jQuery 版本。 jQuery $ 和 Mootools $$ 之间的主要区别在于 jQuery 版本将使用 document.querySelector 查询 DOM,而 Mootools版本将查询 DOM 和 Mootools classes 的实例。要查询 classes,class 必须实现方法 toElement,并且该方法必须 return 对 DOM 元素的引用。

您可以在 Mootools 官方网站上了解有关 elements and element selection, the dollar and dollars 功能的更多信息。