Assorted jQuery questions
1.) What is the difference between these two queries, exactly?
$( "#orderedlist li" )
$( "#orderedlist>li" )
2.) There is a function in the jQuery file itself that returns the following:
function now(){
return +new Date;
}
What does it mean? I've never seen + new ones before.
3.) In a brief review of the textbook, I observed the following examples:
// use this to reset a single form
$( "#reset" ).click( function()
{
$( "form" )[0].reset();
});
// use this to reset several forms at once
$( "#reset" ).click( function()
{
$( "form" ).each( function()
{
this.reset();
});
});
When I try to reference my own queries on array indices, they don't seem to work. However, this example became apparent when I tested it. What can i do wrong?
Edit: I will put this question to my question soon. Edit 2: Actually, I can debug it myself. Wait...
I have guesses for each of them, but I'm not completely versed in the jQuery file itself, I'm not quite sure what works here. Help evaluate.
№ 1:
#orderedlist li- " ": ali-#orderedlist.#orderedlist>li- " ": ali,#orderedlist.
№ 2:
plus - :
return Number(new Date);
. http://xkr.us/articles/javascript/unary-add/ - UNIX.
№ 3:
. ?