diff options
-rw-r--r-- | css/stats.css | 2 | ||||
-rw-r--r-- | css/tutorial.css | 12 | ||||
-rw-r--r-- | includes/header.php | 2 | ||||
-rw-r--r-- | pages/tutorial.php | 16 |
4 files changed, 25 insertions, 7 deletions
diff --git a/css/stats.css b/css/stats.css index c36c1d0..e72fb6a 100644 --- a/css/stats.css +++ b/css/stats.css @@ -16,7 +16,7 @@ td, th { background: #000; transition:background .5s; -webkit-transition:background .5s; - -o-transition:color .5s; + -o-transition:color .5s; -moz-transition:color .5s; cursor: default; } diff --git a/css/tutorial.css b/css/tutorial.css index 971bfce..41a2ae4 100644 --- a/css/tutorial.css +++ b/css/tutorial.css @@ -17,6 +17,10 @@ a.next { float: right; margin: 0 10px; cursor: pointer; + transition:background .3s; + -webkit-transition:background .3s; + -o-transition:color .3s; + -moz-transition:color .3s; } a.next:hover { background-color: #446; @@ -33,3 +37,11 @@ a.next.disabled, a.next.disabled:hover { .hidden { display: none; } + +.flash { + background-color: #a95 !important; + transition:background .3s !important; + -webkit-transition:background .3s !important; + -o-transition:color .3s !important; + -moz-transition:color .3s !important; +} diff --git a/includes/header.php b/includes/header.php index 3943238..d56e20d 100644 --- a/includes/header.php +++ b/includes/header.php @@ -16,7 +16,7 @@ function htmlHeader($css = array()) { }
?>
<script src="js/ajax.js" async="async"></script>
- <script src="js/mapspecs.js" async="async"></script>
+ <script src="js/mapspecs.js"></script>
</head>
<?php
}
diff --git a/pages/tutorial.php b/pages/tutorial.php index 36d6721..5e582c6 100644 --- a/pages/tutorial.php +++ b/pages/tutorial.php @@ -19,13 +19,11 @@ function challengeGo(mapid) { switch (mapid) {
case '1':
tv.unlock();
- flashelement('nextbtn', 15, null, 400);
updateDsp(1, 'instructions', "Now that you see what's going on, let's move on to some puzzles.");
break;
case '2':
if (moves >= 18) {
- flashelement('nextbtn', 15, null, 400);
updateDsp(1, 'instructions', "Great, that's 18 moves!<br />Lets move on to the next shall we?");
tv.unlock();
} else {
@@ -37,7 +35,6 @@ function challengeGo(mapid) { case '3':
if (moves >= 64) {
- flashelement('nextbtn', 15, null, 400);
updateDsp(1, 'instructions', '<p>I almost confused you! hehe.</p><p>Next?</p>');
tv.unlock();
} else {
@@ -49,7 +46,6 @@ function challengeGo(mapid) { case '4':
if (moves >= 45) {
- flashelement('nextbtn', 15, null, 400);
updateDsp(1, 'instructions', "Figure out how that teleport worked?<br />Play with it if you didn't");
tv.unlock();
} else {
@@ -61,7 +57,6 @@ function challengeGo(mapid) { case '5':
if (moves >= 75) {
- flashelement('nextbtn', 15, null, 400);
updateDsp(1, 'instructions', 'Look at you so pro.<br />Go play the game!');
//Unlock next button.
} else {
@@ -141,6 +136,7 @@ function TutorialView(low, high) { this.cur = low;
this.nextbtn = document.getElementById('nextbtn');
this.prevbtn = document.getElementById('prevbtn');
+ this.interval1 = this.interval2 = null;
}
TutorialView.prototype.showTutorial = function(num) {
for (var i = this.low; i <= this.high; i++) {
@@ -153,6 +149,8 @@ TutorialView.prototype.showTutorial = function(num) { startChallenge(num);
}
TutorialView.prototype.next = function() {
+ clearInterval(this.interval1);
+ clearInterval(this.interval2);
if (this.nextbtn.className.indexOf(' disabled') > -1)
return;
this.showTutorial(++this.cur);
@@ -176,6 +174,14 @@ TutorialView.prototype.prev = function() { }
TutorialView.prototype.unlock = function(n) {
this.nextbtn.className = this.nextbtn.className.replace('disabled', '');
+ this.interval1 = setInterval(function() {
+ tv.nextbtn.className += ' flash';
+ }, 1200);
+ setTimeout(function() {
+ this.interval2 = setInterval(function() {
+ tv.nextbtn.className = tv.nextbtn.className.replace('flash', '');
+ }, 1200);
+ }, 600);
}
</script>
|