What is the difference between the $get and $find functions in javascript?
I'm guessing that these functions aren't really javascript-native things, so an additional question would be what are they native to?
Clarification
The web app I've seen this in uses jquery and ASP.NET AJAX. Perhaps that changes the meaning of these functions?
What is the difference between the $get and $find functions in javascript?
I'm guessing that these functions aren't really javascript-native things, so an additional question would be what are they native to?
Clarification
The web app I've seen this in uses jquery and ASP.NET AJAX. Perhaps that changes the meaning of these functions?
Share Improve this question edited Apr 22, 2010 at 17:09 Chris asked Apr 22, 2010 at 16:49 ChrisChris 2,9912 gold badges33 silver badges48 bronze badges 1- 1 $get and $find in javascript? – SeanJA Commented Apr 22, 2010 at 16:52
2 Answers
Reset to default 5You are talking about the MS Ajax Client Library shortcut methods.
$find
is a shortcut for the Sys.Application.findComponent
method, and allows you to get a Component object.
$get is a shortcut for the Sys.UI.DomElement getElementById method, and it returns a DomElement object.
Check the following article:
- The Ever-Useful $get and $find ASP.NET AJAX Shortcut Functions
$get and $find are not part of Javascript. They are either a part of your Javascript host, in any library or code you have or undefined. If they are undefined then there is no difference.