English feliratok

← Money

Beágyazókód kérése
7 Languages

Showing Revision 3 created 05/25/2016 by Udacity Robot.

  1. With jQuery, you'll be seeing the dollar sign a lot.
  2. But what is the dollar sign?
  3. Is it some special JavaScript keyword?
  4. I'll press Enter, and, low and
  5. behold, we see the exact same object that we saw before.
  6. As it turns out, the jQuery object and
  7. the dollar sign are mapped to the exact same thing.
  8. So, what is this dollar sign?
  9. The dollar sign is a character like any other.
  10. We could even reassign it as variable to something else if we wanted to.
  11. For instance var $ equals cameron.
  12. And then when I type in the dollar sign and press Enter, we see cameron.
  13. With jQuery the dollar sign is just a pointer to the same JavaScript object we
  14. saw before.
  15. In the spirit of making your front-end code easier to write,
  16. jQuery uses the dollar sign because because it's faster and
  17. easier to type than the whole word jQuery.
  18. In fact, some other JavaScript libraries use the dollar sign as well.
  19. For instance, the MooTools library also maps the dollar sign to a variable