What does $$ mean in Javascript?

前端 未结 6 1772
别那么骄傲
别那么骄傲 2021-01-06 17:17

I am looking at some javascript code and it has this in a function:

$$(\'.CssClass\').each(function(x) { .... } )

I get that the intent is

6条回答
  •  长发绾君心
    2021-01-06 18:00

    Probably this prototype function:

    $$(cssRule...) -> [HTMLElement...]
    

    Takes an arbitrary number of CSS selectors (strings) and returns a document-order array of extended DOM elements that match any of them.

    http://www.prototypejs.org/api/utility#method-$$

提交回复
热议问题