1 00:00:00,450 --> 00:00:03,930 We can toggle an element using the toggle action. 2 00:00:03,930 --> 00:00:10,330 This HD e-mail page provides a demonstration of toggling when we press the toggle button. 3 00:00:10,330 --> 00:00:15,940 The text becomes hidden over an interval of one second when we press the button again. 4 00:00:16,030 --> 00:00:22,380 The text reappears. 5 00:00:22,530 --> 00:00:28,220 Let's take a look at how this script works. 6 00:00:28,230 --> 00:00:30,720 Here we have a toggle button. 7 00:00:30,730 --> 00:00:33,780 We also have one paragraph element with some text 8 00:00:37,840 --> 00:00:46,120 our script has a click event on the button that toggles the paragraph over an interval of 1000 milliseconds 9 00:00:46,240 --> 00:00:47,110 or one second. 10 00:00:50,600 --> 00:00:56,510 Here you can see we've referenced the button element here's our click event 11 00:00:59,520 --> 00:01:05,230 here we've referenced that we want this event applied to the paragraph tags. 12 00:01:05,400 --> 00:01:13,480 In this case there is one element with paragraph tags and the action is the toggle action the one thousand 13 00:01:13,770 --> 00:01:21,960 refers to the amount of time it will take for the paragraph element to toggle once the button is pressed.