Template:AdventCalendar: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<html> | <html> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
function date() { | |||
var d = new Date(); | |||
var num = d.getDate() | |||
document.getElementById("advent"+num).innerHTML = num+"<br><p style='font-size: 13px;'>(today)</p>"; | |||
$('#advent'+num).css("background", "black"); | |||
for(var i = 1; i <= num; i++) { | |||
$('#advent'+i).css("background", "black"); | |||
} | |||
} | |||
window.onload = function(){ | window.onload = function(){ | ||
date(); | |||
var n = 3; | var n = 3; | ||
var number = Math.floor(Math.random()*n)-1; | var number = Math.floor(Math.random()*n)-1; | ||
Line 9: | Line 19: | ||
$('#calendar').css("background-image", "url(http://pokeheroes.com/img/christmas/2015/adventcalendar/"+number+".png)"); | $('#calendar').css("background-image", "url(http://pokeheroes.com/img/christmas/2015/adventcalendar/"+number+".png)"); | ||
}; | }; | ||
function setca(n) { | |||
$('#calendar').css("background-image", "url(http://pokeheroes.com/img/christmas/2015/adventcalendar/"+n+".png)"); | |||
}; | |||
</script> | </script> | ||
<style> | <style> | ||
Line 26: | Line 41: | ||
border: 2px solid; | border: 2px solid; | ||
width: 331px; | width: 331px; | ||
} | |||
.changelook a { | |||
cursor: pointer; | |||
} | } | ||
Line 42: | Line 61: | ||
<div id="calendar" class="adventcalender" style="margin-top: 16px"> | <div id="calendar" class="adventcalender" style="margin-top: 16px"> | ||
<table style="position: relative; margin: auto auto"> | <table style="position: relative; margin: auto auto"> | ||
<tbody><tr><td><div class="door" style="cursor: pointer" >24</div></td><td><div class="door" style="cursor: pointer" >12</div></td><td><div class="door" style="cursor: pointer" >18</div></td><td><div class="door" id="advent14" style="cursor: pointer">14</div></td></tr><tr><td><div class="door" id="advent7" style="background: black; cursor: pointer">7</div></td><td><div class="door" id="advent4" style="background: black; cursor: pointer">4</div></td><td><div class="door" id="advent9" style=" background: black; cursor: pointer" >9</div></td><td><div class="door" id="advent22" style="cursor: pointer">22</div></td></tr><tr><td><div class="door" id="advent17" style="cursor: pointer">17</div></td><td><div class="door" id="advent15" style="cursor: pointer">15</div></td><td><div class="door" id="advent13" style="cursor: pointer" >13</div></td><td><div class="door" id="advent2" style="background: black; cursor: pointer" >2</div></td></tr><tr><td><div class="door" id="advent3" style="background: black; cursor: pointer">3</div></td><td><div class="door" id="advent6" style="background: black; cursor: pointer">6</div></td><td><div class="door" id="advent21" style="cursor: pointer">21</div></td><td><div class="door" id="advent16" style="cursor: pointer" >16</div></td></tr><tr><td><div class="door" id="advent8" style="cursor: pointer" >8</div></td><td><div class="door" id="advent19" style="cursor: pointer" >19</div></td><td><div class="door" id="advent11" style="cursor: pointer" >11</div></td><td><div class="door" id="advent5" style="background: black; cursor: pointer" >5</div></td></tr><tr><td><div class="door" id="advent10" style=" background: black; cursor: pointer" >10 | <tbody><tr><td><div class="door" style="cursor: pointer" >24</div></td><td><div class="door" style="cursor: pointer" >12</div></td><td><div class="door" style="cursor: pointer" >18</div></td><td><div class="door" id="advent14" style="cursor: pointer">14</div></td></tr><tr><td><div class="door" id="advent7" style="background: black; cursor: pointer">7</div></td><td><div class="door" id="advent4" style="background: black; cursor: pointer">4</div></td><td><div class="door" id="advent9" style=" background: black; cursor: pointer" >9</div></td><td><div class="door" id="advent22" style="cursor: pointer">22</div></td></tr><tr><td><div class="door" id="advent17" style="cursor: pointer">17</div></td><td><div class="door" id="advent15" style="cursor: pointer">15</div></td><td><div class="door" id="advent13" style="cursor: pointer" >13</div></td><td><div class="door" id="advent2" style="background: black; cursor: pointer" >2</div></td></tr><tr><td><div class="door" id="advent3" style="background: black; cursor: pointer">3</div></td><td><div class="door" id="advent6" style="background: black; cursor: pointer">6</div></td><td><div class="door" id="advent21" style="cursor: pointer">21</div></td><td><div class="door" id="advent16" style="cursor: pointer" >16</div></td></tr><tr><td><div class="door" id="advent8" style="cursor: pointer" >8</div></td><td><div class="door" id="advent19" style="cursor: pointer" >19</div></td><td><div class="door" id="advent11" style="cursor: pointer" >11</div></td><td><div class="door" id="advent5" style="background: black; cursor: pointer" >5</div></td></tr><tr><td><div class="door" id="advent10" style=" background: black; cursor: pointer" >10</div></td><td><div class="door" id="advent20" style="cursor: pointer" >20</div></td><td><div class="door" id="advent1" style="background: black; cursor: pointer" >1</div></td><td><div class="door" id="advent23" style="cursor: pointer" >23</div></td></tr> </tbody></table> | ||
</div> | </div> | ||
<div class="changelook"></div> | <div class="changelook">Select: <a ca="0" id="ca" onclick="setca(0);"> First Calendar</a> | <a ca="1" id="ca" onclick="setca(1);"> Second Calendar</a> |<a ca="2" id="ca" onclick="setca(2);"> Third Calendar</a> </div> | ||
</html> | </html> |