Fireship · @fireship

The Legend of jQuery in 100 Seconds

Uploaded September 14, 2020 · Length 2:11

The Legend of jQuery in 100 Seconds

Summary

A 100-second history of jQuery, the world's most popular JavaScript library, and its benefits for web development.

  • jquery
  • javascript library
  • web development
  • javascript framework
  • jquery benefits

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    jquery by far the world's most popular

  2. 0:02

    javascript library being found on over

  3. 0:04

    80 percent of the world's top 1 million

  4. 0:06

    websites

  5. 0:07

    that's more than four times the adoption

  6. 0:08

    of angular react and view

  7. 0:10

    combined it was invented back in 2006 by

  8. 0:13

    john resig before most of today's junior

  9. 0:14

    developers were even born he originally

  10. 0:16

    wanted to call it jselect

  11. 0:18

    but all the domains were taken the

  12. 0:19

    popularity of jquery is driven by a

  13. 0:21

    fundamental need in the web development

  14. 0:23

    market

  15. 0:23

    javascript is a total and we want to

  16. 0:25

    write less of it furthermore

  17. 0:27

    back in o6 browsers had a bunch of

  18. 0:28

    interop issues jquery provided a single

  19. 0:31

    api to handle the edge cases across

  20. 0:33

    multiple browsers

  21. 0:34

    it's so good in fact that browser

  22. 0:36

    vendors of today have standardized many

  23. 0:37

    of its features and ship them as native

  24. 0:39

    apis

  25. 0:40

    you can install it by finding the source

  26. 0:41

    code on the website right click to copy

  27. 0:43

    it then open dreamweaver and find all of

  28. 0:45

    the html pages and paste it into a

  29. 0:47

    script tag on each one your javascript

  30. 0:49

    now has access to the mighty dollar sign

  31. 0:51

    function

  32. 0:51

    it takes a selector as its argument like

  33. 0:53

    a tag name class or id it'll grab that

  34. 0:56

    html from the dom

  35. 0:57

    allowing you to perform actions on it in

  36. 0:58

    the html we have a list of items and we

  37. 1:00

    want to grab the first item in vanilla

  38. 1:02

    js we'd have to use this ridiculously

  39. 1:04

    long line of code to do so

  40. 1:05

    in react we have to completely rewrite

  41. 1:07

    our code into a component and implement

  42. 1:09

    the confusing ref hook

  43. 1:10

    with jquery we can use the dollar sign

  44. 1:12

    to grab all the list items and then call

  45. 1:13

    first to get the first one

  46. 1:15

    it's easy and readable if we want to

  47. 1:16

    animate it we can do that by simply

  48. 1:18

    chaining a method to it and we can chain

  49. 1:20

    more methods to it to register event

  50. 1:21

    listeners and all kinds of other fun

  51. 1:23

    stuff

  52. 1:23

    declarative framework developers love to

  53. 1:25

    fight each other about state management

  54. 1:27

    don't make me swing on you bro

  55. 1:28

    while jquery developers don't have this

  56. 1:30

    problem because there's no data layer to

  57. 1:31

    worry about instead you just start with

  58. 1:33

    an object

  59. 1:33

    shade methods to it and let the state

  60. 1:35

    manage itself when it comes time to

  61. 1:36

    extend jquery there's no need for

  62. 1:38

    insanely complex web pack bundling or

  63. 1:40

    npm packages

  64. 1:41

    you can just extend its prototype with a

  65. 1:43

    plugin and there's already a huge

  66. 1:44

    ecosystem of plugins to get things done

  67. 1:46

    quickly

  68. 1:46

    as an added bonus once you've mastered

  69. 1:48

    jquery you can jump into jquery mobile

  70. 1:50

    and start building native apps for

  71. 1:52

    windows phone and blackberry

  72. 1:53

    developers of today sometimes make fun

  73. 1:55

    of jquery but that's just the stuff you

  74. 1:56

    have to deal with when you're the king

  75. 1:57

    of javascript libraries

  76. 1:59

    this has been the legend of jquery in