A very common use in jQuery is to distinguish jQuery objects stored in variables from other variables.
(jQuery中非常普遍的用法是将存储在变量中的jQuery对象与其他变量区分开。)
For example, I would define(例如,我将定义)
var $email = $("#email"); // refers to the jQuery object representation of the dom object
var email_field = $("#email").get(0); // refers to the dom object itself
I find this to be very helpful in writing jQuery code and makes it easy to see jQuery objects which have a different set of properties.
(我发现这对于编写jQuery代码非常有帮助,并且可以轻松查看具有不同属性集的jQuery对象。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…