-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from Mubashir-Md/main
Recruitment drive updates
- Loading branch information
Showing
11 changed files
with
697 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
window.onload = () => { | ||
let idToShow = window.location.hash.replace("#", ""); | ||
|
||
let divs = document.querySelectorAll(".ans"); | ||
|
||
for (let i = 0; i < divs.length; i++) { | ||
if (divs[i].id != idToShow) { | ||
// console.log(divs[i].id); | ||
divs[i].style.display = "none"; | ||
} | ||
} | ||
|
||
// console.log(idToShow); | ||
}; | ||
|
||
let answers = { | ||
1: "16", | ||
2: "14", | ||
3: "15", | ||
4: "2", | ||
5: "1", | ||
6: "11", | ||
7: "Y", | ||
8: "8", | ||
9: "52", | ||
10: "87", | ||
11: "4", | ||
12: "3", | ||
13: "7", | ||
14: "10", | ||
15: "65", | ||
16: "3", | ||
17: "2", | ||
18: "a", | ||
19: "0", | ||
20: "3", | ||
}; | ||
|
||
function checkAnswer(qno) { | ||
let val = document.getElementById(`answerInput${qno}`).value; | ||
let greenTick = document.createElement("img"); | ||
greenTick.src = "/public/img/tick.gif"; | ||
let redTick = document.createElement("img"); | ||
redTick.src = "/public/img/wrong.gif"; | ||
|
||
if (val == answers[qno]) { | ||
let tickContainer = document.getElementById(`tickContainer${qno}`); | ||
|
||
while (tickContainer.firstChild) { | ||
tickContainer.removeChild(tickContainer.firstChild); | ||
} | ||
|
||
let msg = document.getElementById(`msg${qno}`); | ||
|
||
msg.innerHTML = "Great job! π You've aced the challenge! π Ready to level up? Join us to enhance your coding skills and make an impact. Click Apply Now to start the journey! π»π"; | ||
|
||
let applyBtn = document.createElement("a"); | ||
applyBtn.innerHTML = "Apply Now ->"; | ||
applyBtn.href = "https://forms.gle/9UYQddtDJrMrgfc86"; | ||
|
||
tickContainer.appendChild(greenTick); | ||
|
||
let thingsDiv = document.getElementsByClassName("things")[qno - 1]; | ||
if (thingsDiv.firstElementChild && thingsDiv.lastElementChild) { | ||
thingsDiv.removeChild(thingsDiv.firstElementChild); | ||
thingsDiv.removeChild(thingsDiv.lastElementChild); | ||
} | ||
|
||
|
||
msg.after(applyBtn); | ||
|
||
|
||
} | ||
else { | ||
let tickContainer = document.getElementById(`tickContainer${qno}`); | ||
|
||
while (tickContainer.firstChild) { | ||
tickContainer.removeChild(tickContainer.firstChild); | ||
} | ||
|
||
let msg = document.getElementById(`msg${qno}`); | ||
|
||
msg.innerHTML = "No worries! π€ Coding challenges can be tricky. It's cool if you didn't nail it this time. π Join us to boost your coding skills. Click Apply Now and let's learn together! ππ‘π©βπ»π¨βπ»"; | ||
|
||
let applyBtn = document.createElement("a"); | ||
applyBtn.innerHTML = "Apply Now ->"; | ||
applyBtn.href = "https://forms.gle/9UYQddtDJrMrgfc86"; | ||
|
||
tickContainer.appendChild(redTick); | ||
|
||
let thingsDiv = document.getElementsByClassName("things")[qno - 1]; | ||
if (thingsDiv.firstElementChild && thingsDiv.lastElementChild) { | ||
thingsDiv.removeChild(thingsDiv.firstElementChild); | ||
thingsDiv.removeChild(thingsDiv.lastElementChild); | ||
} | ||
|
||
|
||
msg.after(applyBtn); | ||
|
||
} | ||
} |