Lab #23 Hold Shift And Check Checkbox
Lab #23 was titled "Hold Shift and Check Checkbox". Literally, the point of this lab is to allow you to click the first checkbox and then hold shift, click the last checkbox and it will select all of the checkboxes. Why is this even a lab?
Seriously, there isn't much to explain. This lab was really focused on being able to check multiple boxes at once by holding shift and skipping over the others. Anyways, I began this lab by creating many divs that help an input type checkbox and a paragraph tag to say something near the checkbox. Within my CSS, I just made the layout of the divs with the checkboxes so it looked organized. In my JavaScript, I used a selector all which was bound with an if statement to check if you were holding shift. If you were holding shift and clicked over a few checkboxes, it would allow you to check them all with one click.
Web designers could probably use this technique to allow answering on surveys more easier. If all of the above applies to someone on a said survey, then they can hold shift and click over all of the checkboxes. There are definitely more efficient ways to work around using this though, like a checkbox that is labeled, "all of the above". However, it can still be handy to know how to use this method.
Seriously, there isn't much to explain. This lab was really focused on being able to check multiple boxes at once by holding shift and skipping over the others. Anyways, I began this lab by creating many divs that help an input type checkbox and a paragraph tag to say something near the checkbox. Within my CSS, I just made the layout of the divs with the checkboxes so it looked organized. In my JavaScript, I used a selector all which was bound with an if statement to check if you were holding shift. If you were holding shift and clicked over a few checkboxes, it would allow you to check them all with one click.
Web designers could probably use this technique to allow answering on surveys more easier. If all of the above applies to someone on a said survey, then they can hold shift and click over all of the checkboxes. There are definitely more efficient ways to work around using this though, like a checkbox that is labeled, "all of the above". However, it can still be handy to know how to use this method.

Comments
Post a Comment