Skip to content

Commit dc6861f

Browse files
committed
Write a JavaScript script that toggles the class of the <header> element when the user clicks on the tag DIV#toggle_header
1 parent 8aeebd2 commit dc6861f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
$(document).ready(function () {
2+
$("DIV#toggle_header").click(function () {
3+
$("header").toggleClass("red green");
4+
});
5+
});

0 commit comments

Comments
 (0)