-
Notifications
You must be signed in to change notification settings - Fork 1
/
custom.js
27 lines (24 loc) · 931 Bytes
/
custom.js
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
$(function(){
$('.form-group input').addClass('form-control');
// Verplicht veld
var vinkje = '<span class="input-group-addon"><i class="glyphicon glyphicon-ok form-control-feedback" title="Verplicht veld" style="color: red"></i></span>';
$('input').each(function(){
if (!$(this).parent().is('div.input-group')) {
$(this).filter('[required]').wrap('<div class="input-group">');
}
});
$('input[required]').after(vinkje);
// Target blank
$('a[href^="http://"], a[href^="https://"]').attr('target','_blank');
// Debug info
$('#debugInfo').before('<div class="pull-right"><button type="button" class="btn btn-primary btn-xs btn_sh">Verberg info</button></div>');
$('#main').on('click', '.btn_sh', function(){
if($('#debugInfo').is(':visible')) {
$('#debugInfo').slideUp();
$(this).text('Toon info');
} else {
$('#debugInfo').slideDown();
$(this).text('Verberg info');
}
});
})