diff --git a/Pages/Quizes/tests/button-1/script.js b/Pages/Quizes/tests/button-1/script.js
index 483aa1dfd..4c33cf54d 100644
--- a/Pages/Quizes/tests/button-1/script.js
+++ b/Pages/Quizes/tests/button-1/script.js
@@ -112,11 +112,28 @@ const quizData = [
const submitButton = document.getElementById("submit");
const difficulty = document.getElementById("difficulty");
const quizcount = document.getElementById("quizcount");
+ const prev_score= document.getElementById("max-score");
+ const max_wrapper= document.getElementsByClassName("max-wrapper")[0]
-
+
let currentQuiz = 0;
let score = 0;
const weak_topics=[];
+ const loadScore=()=>{
+ const score= localStorage.getItem('btn-1-max');
+ if(score){
+ prev_score.innerHTML=`Max score
${score}`;
+ }else{
+ max_wrapper.style.display='none'
+ }
+
+ }
+ const storeMax=(score)=>{
+ const maxscore = localStorage.getItem('btn-1-max');
+ if (score>maxscore){
+ localStorage.setItem('btn-1-max',score)
+ }
+ }
const deselectAnswers = () => {
answerElements.forEach((answer) => (answer.checked = false));
@@ -132,6 +149,7 @@ const quizData = [
const loadQuiz = () => {
deselectAnswers();
+
const currentQuizData = quizData[currentQuiz];
questionElement.innerText = currentQuizData.question;
a_text.innerText = currentQuizData.a;
@@ -143,7 +161,7 @@ const quizData = [
};
loadQuiz();
-
+ loadScore();
submitButton.addEventListener("click", () => {
const answer = getSelected();
if (answer) {
@@ -161,6 +179,8 @@ const quizData = [
You answered ${score}/${quizData.length} questions correctly
`
+ storeMax(score);
+ loadScore();
var temp;
for (i = 0; i < weak_topics.length; i++) {
diff --git a/Pages/Quizes/tests/button-1/style.css b/Pages/Quizes/tests/button-1/style.css
index bf21138f3..8ad5028c1 100644
--- a/Pages/Quizes/tests/button-1/style.css
+++ b/Pages/Quizes/tests/button-1/style.css
@@ -334,6 +334,23 @@ ul {
margin-left: 1.5vw;
}
/* footer */
+.max-wrapper{
+ background-color:#F0F1FF;
+ border-radius: 50%;
+ width:100px;
+ height:100px;
+ display: flex;
+ justify-content:center;
+ align-items: center;
+ border : 7px solid #242969;
+ margin-bottom: 20px;
+ padding: 5px;
+}
+#max-score{
+ font-family: 'Poppins', sans-serif;
+ font-weight: bold;
+ text-align: center;
+}
diff --git a/Pages/Quizes/tests/button-2/index.html b/Pages/Quizes/tests/button-2/index.html
index f07dda308..d91278676 100644
--- a/Pages/Quizes/tests/button-2/index.html
+++ b/Pages/Quizes/tests/button-2/index.html
@@ -45,7 +45,9 @@
Scalars & Vectors