text
stringlengths
1
81
start
float64
0
10.1k
duration
float64
0
24.9
it will be enabled so if I go back to
4,583.18
6.87
the page go here I type in it right now
4,587.68
4.2
by default the submit button is disabled
4,590.05
4.29
but as soon as I start typing something
4,591.88
4.77
now the submit button is active and I
4,594.34
5.4
can actually click on it and all right
4,596.65
4.92
this isn't great because I clicked on it
4,599.74
3.36
but the submit button is still enabled
4,601.57
3.33
so what I might like to do is all right
4,603.1
3.72
after I've submitted the forum after
4,604.9
3.84
I've added a new task let's go back and
4,606.82
5
disable the submit button so after I've
4,608.74
6.15
submitted the form after we've added the
4,611.82
5.23
new task to my list of tasks after we've
4,614.89
4.08
cleared out the value from the input
4,617.05
5.64
field let me also get the submit button
4,618.97
6.72
set it's disabled property equal to true
4,622.69
5.76
now even after I submit the form the
4,625.69
4.2
submit button is still going to be
4,628.45
3.87
disabled such that I type in foo now
4,629.89
4.56
submit is active I press it but the
4,632.32
3.39
submit button goes back to being
4,634.45
4.38
inactive as well it turns out that even
4,635.71
4.77
now there's still a little bit of a bug
4,638.83
2.88
if I go back here and I type in
4,640.48
4.44
something like bar but then I backspace
4,641.71
6.06
back to like nothing here the submit
4,644.92
4.17
button is still active so I can still
4,647.77
3.57
technically submit a task that has no
4,649.09
4.47
content inside of it and so I might like
4,651.34
3.9
to have some way of preventing against
4,653.56
3.54
that as well and that's just some
4,655.24
3.42
additional logic we now have access to
4,657.1
3.36
JavaScript that has conditions that has
4,658.66
4.2
loops that has functions and so if I
4,660.46
5.82
want to do something like conditionally
4,662.86
6.75
check I can say if document query
4,666.28
8.66
selector task dot value dot length is
4,669.61
8.37
greater than 0 meaning like something's
4,674.94
5.83
actually typed into the task field will
4,677.98
6.47
then go ahead and set disabled to false
4,680.77
7.1
but otherwise
4,684.45
3.42
go ahead and set disabled equal the true
4,688.69
6.31
so now here we're checking if the length
4,692.11
4.57
of what the user has typed in is greater
4,695
3.3
than zero they actually type something
4,696.68
3.72
in then yes give them access to the
4,698.3
4.53
submit button but otherwise don't give
4,700.4
4.83
them access to that button so now i
4,702.83
4.77
refresh the page disabled by default I
4,705.23
4.47
typed something in it's enabled I delete
4,707.6
4.56
delete delete and it goes back to being
4,709.7
4.95
disabled so javascript has allowed us to
4,712.16
4.11
really make our pages much more
4,714.65
3.45
interactive and immediately interactive
4,716.27
3.69
based on how the user is interacting
4,718.1
3.72
with the page as they begin to type
4,719.96
4.56
things as they begin to delete things as
4,721.82
4.59
they press buttons we're able to have
4,724.52
3.63
the page respond either by adding
4,726.41
3.78
content to the Dom by literally adding
4,728.15
4.56
parts to the HTML page of changing the
4,730.19
4.11
styles of things changing particular
4,732.71
3.42
properties of elements and this is
4,734.3
3.12
really where the power of JavaScript
4,736.13
3.3
begins to come in isn't allowing
4,737.42
5.52
ourselves to do things like that now so
4,739.43
5.31
far we've only been able to have events
4,742.94
4.41
happen when the user does something when
4,744.74
4.5
the user clicks on a button or when the
4,747.35
3.96
user presses a key for example but it
4,749.24
4.02
turns out JavaScript has other ways of
4,751.31
3.93
allowing functions to run in fact on
4,753.26
3.54
their own we can set what are called
4,755.24
3.27
intervals where a particular function
4,756.8
4.08
runs every some number of milliseconds
4,758.51
4.41
for example and so if we go back to like
4,760.88
3.8
the counter example from before right
4,762.92
4.89
now for this counter example I have to
4,764.68
4.54
be the one to press the count button
4,767.81
3.12
that is going to increment the value of
4,769.22
4.62
count every single time but I could put
4,770.93
5.34
that inside of an interval instead so
4,773.84
3.96
let me go back to counter
4,776.27
4.05
dot HTML whose JavaScript is inside of
4,777.8
6
counter j/s and now what I'd like to say
4,780.32
8.52
is I would like when the Dom content is
4,783.8
11.04
loaded let me set an interval for count
4,788.84
10.8
and 1000 so what is that going to do set
4,794.84
6.27
interval as a function built into
4,799.64
3.57
JavaScript here where I'm saying that I
4,801.11
3.42
would like to create a new interval
4,803.21
3.54
where every so often go ahead and run a
4,804.53
4.32
particular function and I would like to
4,806.75
3.9
run the count function will recall that
4,808.85
3.75
count function is going to increment the
4,810.65
3.48
value of count and I'll get rid of this
4,812.6
3.24
alert for now just for simplicity all I
4,814.13
3.87
want the count function to do is update
4,815.84
4.17
the h1 with the new value of the counter
4,818
2.78