Team:Gothenburg/Calendar
From 2014.igem.org
(Difference between revisions)
(andreas bugfixing) |
(andreas bugfixing) |
||
Line 65: | Line 65: | ||
</style> | </style> | ||
+ | |||
+ | |||
</head> | </head> | ||
<body> | <body> | ||
Line 1,447: | Line 1,449: | ||
</section> | </section> | ||
+ | <script type="text/javascript"> | ||
+ | var box = $( "#contentDialog" ); | ||
+ | |||
+ | //hide popup | ||
+ | $(document).on('click', function(event) { | ||
+ | |||
+ | if (!$(event.target).closest('.date').length && | ||
+ | !$(event.target).closest('#contentDialog').length && | ||
+ | !$(event.target).closest('#closeContentDialog').length) { | ||
+ | box.fadeOut(); | ||
+ | } | ||
+ | |||
+ | }); | ||
+ | |||
+ | $( ".date" ).click(function() { | ||
+ | |||
+ | showContentOf(this.id); | ||
+ | |||
+ | }); | ||
+ | |||
+ | |||
+ | function showContentOf(dateId) { //pass parameter with quotes like '2014-06-28' | ||
+ | |||
+ | var selectedContent = $( "#" + dateId + ">span").html(); | ||
+ | |||
+ | box.html( selectedContent ); | ||
+ | box.attr('title', dateId); | ||
+ | box.fadeIn(); | ||
+ | |||
+ | } | ||
+ | </script> | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 14:50, 7 August 2014
26
|
27
|
28
|
29
|
30
|
31
|
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
|
1
|
2
|
3
|
4
|
5
|
6
|
30
|
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
|
1
|
2
|
3
|
28
|
29
|
30
|
31
|
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
|
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
|
1
|
2
|
3
|
4
|
5
|