1
00:00:01,180 --> 00:00:07,060
Currently, we have our scrolling content whenever our moses' on top of the element that contains the

2
00:00:07,060 --> 00:00:10,310
content, then we stop the scrolling from happening.

3
00:00:10,600 --> 00:00:14,290
We've also created a button that we can stop and start the scrolling.

4
00:00:14,530 --> 00:00:17,830
And we also have a scroll speed input up here.

5
00:00:17,830 --> 00:00:20,140
So let's activate those in this lesson.

6
00:00:20,440 --> 00:00:27,940
Opening up our ED, we can select instead of getting scroll speed, we can select the scroll speed from

7
00:00:27,940 --> 00:00:34,690
the input directly as we've already set it up as an object within our reach, within our JavaScript

8
00:00:34,960 --> 00:00:41,630
so we can take our speed object and set our scroll speed to be speed value.

9
00:00:42,220 --> 00:00:45,970
So now as we decrease the value, the speed will decrease.

10
00:00:45,970 --> 00:00:49,900
As we increase it, the speed of the scrolling can increase as well.

11
00:00:50,650 --> 00:00:57,070
Let's also update and activate our button so we've got our button element that we created initially.

12
00:00:58,380 --> 00:01:02,870
We added an event listener for that button, and right now all it's doing is click.

13
00:01:03,210 --> 00:01:05,410
So we've got a number of things that we can do with it.

14
00:01:05,670 --> 00:01:12,480
There are several ways to toggle evalu so I going to show you one and we can use the uptick in order

15
00:01:12,480 --> 00:01:13,060
to do this.

16
00:01:13,080 --> 00:01:15,840
This is the shift six.

17
00:01:17,160 --> 00:01:23,910
Equals and we can set it to true, so see what happens whenever I click the button, it's going to actually

18
00:01:23,910 --> 00:01:28,590
toggle that effect so we can turn that on and off.

19
00:01:28,590 --> 00:01:31,440
And we can also read started whenever we click.

20
00:01:31,890 --> 00:01:34,850
We can also update the value that's contained within the button.

21
00:01:35,280 --> 00:01:36,450
So selecting the button.

22
00:01:37,740 --> 00:01:44,880
We could update our entire text of the button, whatever the value of scroller is, and if we want to

23
00:01:44,880 --> 00:01:47,480
get the boolean value, we can output it this way.

24
00:01:48,800 --> 00:01:52,680
So going back to click, it's Bulleen one or zero.

25
00:01:52,850 --> 00:01:53,940
So right now it's zero.

26
00:01:53,960 --> 00:01:55,630
Now it's one and so on.

27
00:01:56,270 --> 00:01:57,980
So it's going to update it to be.

28
00:01:58,820 --> 00:02:05,150
So right now scroller is off then scrolling on, scroll off, scroll on.

29
00:02:05,270 --> 00:02:10,550
Or we could use a territory operator where we check to see the value of scroller.

30
00:02:10,760 --> 00:02:18,740
And just as we used down here, we can return back either or stop.

31
00:02:21,190 --> 00:02:23,020
So let's try that out and click.

32
00:02:24,700 --> 00:02:26,050
And actually, that should be backwards.

33
00:02:27,720 --> 00:02:36,060
So we can negate that and now we can have it to start again and stop whenever we want, and this way

34
00:02:36,060 --> 00:02:38,000
we can update the button values as well.

35
00:02:38,340 --> 00:02:40,520
So go ahead and try this one out for yourself.

36
00:02:40,710 --> 00:02:43,530
And remember, this is the optics of this shift.

37
00:02:43,530 --> 00:02:46,950
Six on most keyboards is going to give you this character.

38
00:02:47,070 --> 00:02:51,000
And what this does is it allows you to convert a number.

39
00:02:51,270 --> 00:02:55,460
So this is a bitwise XOR assignment operator.

40
00:02:55,770 --> 00:02:59,120
So what it's doing is it's toggling the value.

41
00:02:59,430 --> 00:03:02,250
So if it's equal to true, then it's going to be false.

42
00:03:02,430 --> 00:03:03,910
If it's equal to false.

43
00:03:03,930 --> 00:03:05,010
It's going to change the truth.

44
00:03:05,010 --> 00:03:07,170
So it's toggling that assignment.

45
00:03:07,170 --> 00:03:14,250
Operator And this is a quick way that you can update those boolean values of your variables.

46
00:03:14,550 --> 00:03:15,600
So try it for yourself.
