What is the $ symbol used for in JavaScript
2013-06-26 21:49
519 查看
It doesn't mean anything special.
But because
For example, if you're using jQuery and you say
from:
http://stackoverflow.com/questions/3107543/what-is-the-symbol-used-for-in-javascript
But because
$is allowed in identifier names, many Javascript libraries have taken to using
$as the "central" interface to them, or at least as a shortcut for accessing their functionality.
For example, if you're using jQuery and you say
$("div"), this is a call to the
$function with argument "div". When you say
$.post(), it's calling the
postmethod on the
$object (Javascript is nice in that functions are first-class objects).
from:
http://stackoverflow.com/questions/3107543/what-is-the-symbol-used-for-in-javascript
相关文章推荐
- what is AttributeOverride annotation used for in Hibernate
- What is the Execution Context & Stack in JavaScript? [转载]
- An explicit value for the identity column in table can only be specified when a column list is used and IDENTITY_INSERT is ON
- What is the read parameter in @ViewChild for
- What is the difference between a function expression vs declaration in JavaScript?
- What is the Execution Context & Stack in JavaScript? -- To understand scope chain
- What is the syntax for a for loop in TSQL?
- What is the Execution Context & Stack in JavaScript? [转载]
- In Java, what is the default location for newly created files?
- What is the !! (not not) operator in JavaScript?
- What is the difference between the ways to implement inheritance in javascript.
- What is the HINSTANCE passed to CreateWindow and RegisterClass used for?
- What is the best way to implement a heartbeat in C++ to check for socket connectivity?
- What can I learn right now in just 10 minutes that could be useful for the rest of my life?
- CocoaPods报错:The dependency `AFNetworking ` is not used in any concrete target
- Unable to start debugging on the web server. You do not have permission to debug the application. The URL for this project is in
- ReactJs 报错 Element type is invalid: expected a string (from built-in components) or a class/function (for composite components) but got: undefined. Check the render method of `Me`.
- What is the maximum length of a URL in different browsers?
- The Virtual Storage Filter Driver is disabled through the registry. It is inactive for all disk driv