Team:TU Delft/scroll calendar

From 2010.igem.org

(Difference between revisions)
Line 80: Line 80:
function setActiveMonth(mo) {
function setActiveMonth(mo) {
 +
  active_month = mo;
   var el = month_elems[mo];
   var el = month_elems[mo];
   $('#calview').scrollTo(el, {duration: 500} );
   $('#calview').scrollTo(el, {duration: 500} );
Line 95: Line 96:
   });
   });
   $(".prevmonth_btn").click(function() {
   $(".prevmonth_btn").click(function() {
-
     alert('prev');
+
     if (--active_month < 0)
 +
      active_month = month_elems.length - 1;
 +
    setActiveMonth( active_month );
   });
   });
   $(".nextmonth_btn").click(function() {
   $(".nextmonth_btn").click(function() {
-
     alert('next');
+
     setActiveMonth( (active_month + 1) % month_elems.length );
   });
   });
    
    

Revision as of 14:53, 15 September 2010

March
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
April
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
May
MTWTFSS
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
June
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
July
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
August
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
September
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
October
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
November
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30