-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtabPanelen.js
More file actions
32 lines (22 loc) · 820 Bytes
/
tabPanelen.js
File metadata and controls
32 lines (22 loc) · 820 Bytes
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
32
$('.paneel').css('display', 'none');
$('.knoppen').each(function () {
var dezeKnop = $(this);
var actieveKnop = dezeKnop.find('li.actief');
var link = actieveKnop.find('a');
var actiefPaneel = $(link.attr('href'));
dezeKnop.on('click', 'a', function (e) {
e.preventDefault();
var link = $(this);
//alert(link.attr('href'));
var beoogdId = this.hash;
//alert(beoogdId);
if (beoogdId && !link.parent().is('.actief')) {
actiefPaneel.removeClass('actief');
actieveKnop.removeClass('actief');
actiefPaneel = $(beoogdId).addClass('actief');
actieveKnop = link.parent().addClass('actief');
}
});
});
// unobrusive weghalen van niet achtieve vensters
// $('.paneel').css('display', 'none');