The $ dollar sign

后端 未结 9 1803
执笔经年
执笔经年 2020-11-29 04:16

I have something simple like this:

$(selector).append("somestuff");

But since I\'m going to reuse the selector I cache it with:

9条回答
  •  -上瘾入骨i
    2020-11-29 04:25

    $ is just a name - names in JavaScript can contain dollar signs, and can consist of just a dollar sign.

    Whether you use a dollar sign in your name isn't relevant to jQuery - there's nothing special about the dollar sign, except that jQuery defines a function called $.

提交回复
热议问题