Skip to content

Commit 754e288

Browse files
committed
questions project added
1 parent 2756287 commit 754e288

File tree

3,298 files changed

+261131
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,298 files changed

+261131
-0
lines changed

7-questions/final/app.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//using selectors inside the element
2+
const questions = document.querySelectorAll(".question");
3+
4+
questions.forEach(function (question) {
5+
const btn = question.querySelector(".question-btn");
6+
// console.log(btn);
7+
8+
btn.addEventListener("click", function () {
9+
// console.log(question);
10+
11+
questions.forEach(function (item) {
12+
if (item !== question) {
13+
item.classList.remove("show-text");
14+
}
15+
});
16+
17+
question.classList.toggle("show-text");
18+
});
19+
});
20+
21+
// traversing the dom
22+
// const btns = document.querySelectorAll(".question-btn");
23+
24+
// btns.forEach(function (btn) {
25+
// btn.addEventListener("click", function (e) {
26+
// const question = e.currentTarget.parentElement.parentElement;
27+
28+
// question.classList.toggle("show-text");
29+
// });
30+
// });
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Font Awesome Free License
2+
-------------------------
3+
4+
Font Awesome Free is free, open source, and GPL friendly. You can use it for
5+
commercial projects, open source projects, or really almost whatever you want.
6+
Full Font Awesome Free license: https://fontawesome.com/license/free.
7+
8+
# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)
9+
In the Font Awesome Free download, the CC BY 4.0 license applies to all icons
10+
packaged as SVG and JS file types.
11+
12+
# Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL)
13+
In the Font Awesome Free download, the SIL OFL license applies to all icons
14+
packaged as web and desktop font files.
15+
16+
# Code: MIT License (https://opensource.org/licenses/MIT)
17+
In the Font Awesome Free download, the MIT license applies to all non-font and
18+
non-icon files.
19+
20+
# Attribution
21+
Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font
22+
Awesome Free files already contain embedded comments with sufficient
23+
attribution, so you shouldn't need to do anything additional when using these
24+
files normally.
25+
26+
We've kept attribution comments terse, so we ask that you do not actively work
27+
to remove them from files, especially code. They're a great way for folks to
28+
learn about Font Awesome.
29+
30+
# Brand Icons
31+
All brand icons are trademarks of their respective owners. The use of these
32+
trademarks does not indicate endorsement of the trademark holder by Font
33+
Awesome, nor vice versa. **Please do not use brand logos for any purpose except
34+
to represent the company, product, or service to which they refer.**

0 commit comments

Comments
 (0)