We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc180a0 commit f383a36Copy full SHA for f383a36
10 - Hold Shift and Check Checkboxes/my-index.html
@@ -109,9 +109,8 @@
109
110
checkboxes.forEach(checkbox => checkbox.addEventListener('click', bulkCheck));
111
function bulkCheck(event) {
112
- if (!lastClicked) {lastClicked = this;}
+ if (!lastClicked || !event.shiftKey) {lastClicked = this; return;}
113
// console.log(event.shiftKey);
114
- if (!event.shiftKey) {return}
115
const lastClickedIdx = checkboxes.indexOf(lastClicked);
116
const currentIdx = checkboxes.indexOf(this);
117
const boxesToCheck = checkboxes.slice(
0 commit comments