All language subtitles for 175 What is jQuery_.en_US

af Afrikaans
ak Akan
sq Albanian
am Amharic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

All right guys.

Now in this module I want to introduce you to the most popular Javascript library and it's of course

jQuery.

Now there's thousands of Javascript libraries out there, and in later modules we're going to be exploring

some of these libraries,

but none of these libraries have been used or downloaded as often as jQuery.

So why is that?

Well let's take a look at some code that we've written before.

So if we break this code down, essentially what it's doing is it's looking inside the entire document

and it's querying for all the elements that have the selector of button,

so all of the HTML button elements. And then we're going to add an event listener that is going to detect

for clicks on the button. And when it does get detected then we're going to run the callback function

to again look through the document and query for the selector of h1, and then we're going to change

the style, namely the color of that h1 to the color red, and we're using a for loop to traverse through

all of the buttons on our web page in order to add this event listener and this behavior to all of those

buttons.

So we wrote this code in our drumkit.

And this is pure Javascript and it's actually a little bit crazy, if you really think about it, in order

to do something relatively simple,

why does it require so many lines of code,

and who's going to take care of all our joint pain from all this typing?

Now you know how sometimes you have these thoughts and you moan and complain about it a little bit and

then you kind of get over yourself, right?

But not this guy.

This is John Resig, and he was really unhappy with the way that Javascript worked in web development.

He was really frustrated by how unnecessarily complex and lengthy the code had to be.

So whereas most of us probably had that thought and we promptly forgot about it,

not this guy. John decided that he was going to write a library that would do exactly the same as all

of this Javascript code,

but it was as short and as sweet as this.

And so jQuery was born.

It's a library,

so a bunch of code that somebody else wrote that you can incorporate into your own projects and use to

improve your own projects or to make your life simply a lot easier.

Now we've come across libraries before.

Previously we created web sites and we incorporated the Bootstrap library in order to be able to incorporate

code that somebody else wrote in the Bootstrap library to make our lives much easier and make it much

quicker to improve the user interface of our Web site.

Now what jQuery allows you to do is take a line of code, say this, where we're looking through the

DOM of our web site, we're selecting the document and we're querying for the selector h1.

So we're looking for the h1 element in our web page.

Now if we were to use the jQuery library, then we can get rid of all of that and simply say

jQuery("h1").

And if you want to be even shorter, the shorthand way to write jQuery is simply a dollar sign.

So $("h1") does exactly the same as document.querySelector

("h1").

And you can see that it's a lot lot shorter and that will make our Javascript code a lot easier to read,

a lot easier to debug and a lot faster to write,

so we don't have to end up breaking our fingers by typing so much Javascript code.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.