All language subtitles for 8. Updating Our State After a Click Event

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
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 Download
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
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,720 --> 00:00:01,830 In this video. 2 00:00:01,830 --> 00:00:09,600 What we're going to do is very simply start updating the state when we click on a particular button. 3 00:00:09,960 --> 00:00:13,050 So this should be relatively easy to accomplish. 4 00:00:13,410 --> 00:00:17,550 So what I'm going to do here is let's just start off with this button right here. 5 00:00:17,850 --> 00:00:24,610 When you click on this button, we should change the gender from gendered girl to gender. 6 00:00:25,110 --> 00:00:25,680 Boy. 7 00:00:26,520 --> 00:00:27,900 So let's go ahead and do that. 8 00:00:28,380 --> 00:00:31,760 So we're going to go ahead and add this at Click. 9 00:00:32,460 --> 00:00:34,770 So at Click Event Listener. 10 00:00:35,010 --> 00:00:40,310 And as soon as we click, what we want to do is we want to grab the options. 11 00:00:40,320 --> 00:00:41,760 We're going to say options. 12 00:00:42,270 --> 00:00:47,040 So options like so we're going to say dot gender. 13 00:00:47,400 --> 00:00:51,330 We're going to say that that is going to be equal to gender. 14 00:00:51,900 --> 00:00:53,490 Dot boy. 15 00:00:54,210 --> 00:00:56,820 And that's pretty much all it is that we need to do. 16 00:00:57,270 --> 00:01:02,070 So what this should do is actually change the state and thus the background color. 17 00:01:02,310 --> 00:01:03,540 Let's give this a quick test. 18 00:01:04,260 --> 00:01:07,050 And well, it actually changed this state over here. 19 00:01:07,060 --> 00:01:10,380 However, this background color has not changed. 20 00:01:10,800 --> 00:01:15,240 So another reason for that is because it's boy capital like so. 21 00:01:15,660 --> 00:01:16,840 So just refresh that. 22 00:01:17,340 --> 00:01:18,660 And now there we go. 23 00:01:18,690 --> 00:01:21,120 Now it's working the way they'll be expected to. 24 00:01:21,510 --> 00:01:23,910 So just go ahead and copy this a few times. 25 00:01:25,410 --> 00:01:29,940 And this time we're going to say, you need sex for this or you need sex. 26 00:01:30,540 --> 00:01:33,720 And for this, we're going to say, girl. 27 00:01:35,360 --> 00:01:39,320 And then let's scroll down a little bit more. 28 00:01:40,430 --> 00:01:44,030 And over here this time, we're going to change the popularity. 29 00:01:44,040 --> 00:01:50,180 So popularity we're going to say that this is going to be popularity dot trendy. 30 00:01:51,870 --> 00:01:53,700 Let's go ahead and copy that. 31 00:01:55,480 --> 00:01:57,850 And then over here we're going to say unique. 32 00:02:00,370 --> 00:02:00,970 Okay. 33 00:02:02,080 --> 00:02:07,210 And over here, I think we should have this as three, not as two, because I believe this is two. 34 00:02:07,690 --> 00:02:11,410 So right over here, let's go ahead and copy this once more. 35 00:02:11,620 --> 00:02:13,470 This time, we're going to change the length. 36 00:02:13,480 --> 00:02:16,300 So we're going to say options dot length. 37 00:02:16,960 --> 00:02:18,700 It's going to be the length that long. 38 00:02:20,580 --> 00:02:21,640 Let's go ahead and copy that. 39 00:02:21,660 --> 00:02:22,680 One more time. 40 00:02:23,100 --> 00:02:25,560 We're going to say over here. 41 00:02:26,040 --> 00:02:27,060 Options dot length. 42 00:02:27,060 --> 00:02:28,320 This is going to be all. 43 00:02:30,970 --> 00:02:32,580 And the last thing is shorts. 44 00:02:33,560 --> 00:02:38,810 So this should change our state the way that well, we intended to. 45 00:02:39,170 --> 00:02:44,600 So if we go over here now, we have the option to just click on whatever it is that we want and it will 46 00:02:44,600 --> 00:02:48,200 change the state as well as the background colors. 3915

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