- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
function createLinks(abys_id)
{
//get current year
var cur_year = parseInt($("#abys_id"+abys_id).children("span").text());
/*
* create links hrefs
*/
var ml_block = $("#ab_month_grid > .abmg_line");
ml_block.each(function(num,elem)
{
var month;
var anchors = elem.getElementsByTagName("a");
for(var n=0;n<anchors.length;n++)
{
month = (n==0)?12:(n==1)?3:(n==2)?6:9;
(num == 1)
?
(month == 12)
?
month = 1
:
month++
:
(num == 2)
?
(month == 12)
?
month = 2
:
month+=2
:
"--empty--"
;
anchors[n].href = "http://some_site/archive/news/all/"+cur_year+"/"+month+"/";
}
});
}
3.14159265 06.06.2012 13:30 # +1
rat4 06.06.2012 13:38 # +1
ikenfin 06.06.2012 13:44 # 0
bormand 06.06.2012 13:58 # +1