I work much better with examples, I hope this helps.
The first set of parenthesis is the selector, consider this hidden
field:
input type=hidden id=thisHidden value=12.21
If you'd like to fetch the 12.21 out of this hidden field, think of
a CSS selector (where ID = # and CLASS = .):
var
$ == jQuery
to make jQuery work when other js frameworks are also in use you can make
jQuery() work too - avoiding conflicts
the first set of parenthis are for passing params to the jquery object
AFAIK When setting defaults for jquery plugins the parenthis are not
required. I don't know if
$() === $(document)
--Klaus
On 3 Mai, 07:39, kiusau kiu...@mac.com wrote:
QUESTION: What does the first pair of parentheses indicate in the
following statement:
$().getBrowserInformation();
BACKGROUND: I have noticed that their presence or absence can make or
break
FYI, not anymore.
$() === $([])
It now returns an empty jQuery collection
--
Ariel Flesler
On May 3, 5:22 am, Klaus Hartl klaus.ha...@googlemail.com wrote:
$() === $(document)
--Klaus
On 3 Mai, 07:39, kiusau kiu...@mac.com wrote:
QUESTION: What does the first pair of parentheses
Correction:
$() === $(document)
$(null) === $([])
$() === $([])
This is wrongly documented and has orphaned code, will report.
--
Ariel Flesler
On May 3, 12:16 pm, Ariel Flesler afles...@gmail.com wrote:
FYI, not anymore.
$() === $([])
It now returns an empty jQuery collection
--
Fixed: http://dev.jquery.com/changeset/6334
$() === $(document)
$(undefined) === $([])
$(null) === $([])
$() === $([])
--
Ariel Flesler
On May 3, 12:28 pm, Ariel Flesler afles...@gmail.com wrote:
Correction:
$() === $(document)
$(null) === $([])
$() === $([])
This is wrongly documented
On May 3, 1:22 am, Klaus Hartl klaus.ha...@googlemail.com wrote:
$() === $(document)
So, if I have understood properly. jQuery must always be told Where
to go! when called in an HTML document, but knows automatically where
to go when called inside another jQuery method in a JavaScript
document.
On May 3, 8:59 am, Ariel Flesler afles...@gmail.com wrote:
Fixed:http://dev.jquery.com/changeset/6334
This link was very useful. It taught me that fn in the following
construction means prototype.
(function($) {
$.fn.someFunctionName function( ) {
This functions code block
};
8 matches
Mail list logo