South Dakota State University JavaScript Toggle Computer Science Task
Description
How to start:
- Create a basic HTML document with correct structural elements such as <head>, <title>, <body>, etc.
- Create a button on your page using HTML. Add a heading and a paragraph explaining what your button is doing something similar to what is shown in the example above.
- Use javascript and CSS to let users toggle between Day and Night mode by clicking on your button.
- Use embedded CSS and JavaScript to keep all your codes in one document (use <style> and <script> tags within your HTML document) – it would be easier to submit just one file that includes everything for this assignment.
Minimum Requirements:
- A webpage with a title, a heading, a paragraph, and a button.
- Clicking on the button must change the body background color from white to black and from black to white (toggle effect)
- Clicking on the button must change the button’s text from ‘Night Mode’ to ‘Day Mode’ and from ‘Day Mode’ to ‘Night Mode’ (toggle effect)
Tip: You can use JavaScript’s toggle( ) method and attach it to a class that you defined in CSS.
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."