views:

164

answers:

2
+8  A: 
RichieHindle
+1 didn't know about that unary plus operator
Andreas Grech
+3  A: 
  1. The difference is in CSS selectors in general, not jQuery specifically. "#orderedlist li" will select any LI element below the #orderedlist element in the tree. "#orderedlist>li" will only select the LI if it is a direct child of #orderedlist.

  2. The + operator is just a common shortcut for converting a string to a number in JavaScript. E.g., +"1" + 1 will return 2, not 11.

  3. Not sure about this offhand without seeing the example that doesn't work.

James M.