Revision 3c058d7f
Von Sven Schöling vor etwa 12 Jahren hinzugefügt
templates/webpages/menu/menu.html | ||
---|---|---|
4 | 4 |
<body class="menu"> |
5 | 5 |
<div id='html-menu'> |
6 | 6 |
</div> |
7 |
<script type='text/javascript'> |
|
8 |
$(function(){ |
|
9 |
$([% JSON.json(sections) %]).each(function(i,b){ |
|
10 |
var a = $('<a class="ml">').append( |
|
11 |
$('<span class="mii ms">').append($('<div>').addClass(b.img)), |
|
12 |
$('<span class="mic">').append(b.label)); |
|
13 |
if (b.href) a.attr('href', b.href); |
|
14 |
if (b.target) a.attr('target', b.target); |
|
15 |
$('#html-menu').append($('<div class="mi">').addClass(b.class).addClass(b.spacer).attr('id', 'mi' + b.item_id).append(a)); |
|
16 |
}); |
|
17 |
$('#html-menu div.i, #html-menu div.sm').hide(); |
|
18 |
$('#html-menu div.m').each(function() { |
|
19 |
$(this).click(function(){ |
|
20 |
$('#html-menu div.mi').not('div.m').not('[id^=' + $(this).attr('id') + '_]').hide(); |
|
21 |
$('#html-menu div.mi[id^=' + $(this).attr('id') + '_]').toggle(); |
|
22 |
}); |
|
23 |
}); |
|
24 |
}); |
|
25 |
</script> |
|
7 |
<script type='text/javascript'>$(function(){$([% JSON.json(sections) %]).each(function(i,b){var a=$('<a class="ml">').append($('<span class="mii ms">').append($('<div>').addClass(b.i)),$('<span class="mic">').append(b.l));if(b.h)a.attr('href', b.h);if(b.t)a.attr('target', b.t);$('#html-menu').append($('<div class="mi">').addClass(b.c).addClass(b.s).attr('id','mi'+b.id).append(a));});$('#html-menu div.i, #html-menu div.sm').hide();$('#html-menu div.m').each(function(){$(this).click(function(){$('#html-menu div.mi').not('div.m').not('[id^='+$(this).attr('id')+'_]').hide();$('#html-menu div.mi[id^='+$(this).attr('id')+'_]').toggle()})})})</script> |
|
26 | 8 |
</body> |
27 | 9 |
</html> |
Auch abrufbar als: Unified diff
Whitespace entfernt und Identifier minifiziert um response zu verkleinern