Skip to content

Commit

Permalink
Fixed a few bugs related to quiz index once all quizzes have been taken
Browse files Browse the repository at this point in the history
  • Loading branch information
Wylan committed May 11, 2012
1 parent f325b16 commit f1d5340
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions js/script.js
Expand Up @@ -106,7 +106,7 @@ function getTodaysQuiz() {
// last day of the event, if it is past this date we just redirect to the final score page
//var endDate = new Date("May 21, 2012");
if (daysSinceStart() > 8) {
$.mobile.changePage("quizindex.html");
window.location = "quizindex.html";
}else {

// it is within the play period, lets see if they player left off somewhere
Expand Down Expand Up @@ -182,7 +182,8 @@ function nextQuiz(){
dateNumb += 1;
// there are eight pages so send home if the new page would be higher
if (dateNumb > 8) {
return "quizindex.html";
window.location = "quizindex.html";
return;
};
localStorage.setItem("pageNumber", dateNumb);
newUrl = "quiz-day-" + dateNumb + ".html";
Expand Down Expand Up @@ -308,7 +309,10 @@ $("#quizindex").live("pageshow", function (event) {
};
if (daysSinceStart() > 8) {
$("div.ui-page-active a.nextQuizButton").addClass("hidden");
};
};
if (localStorage.getItem("quiz-40win") != null) {
$("div.ui-page-active a.nextQuizButton").addClass("hidden");
};
});
var currentPage;

Expand Down

0 comments on commit f1d5340

Please sign in to comment.