blob: f15430081fa3a79cb7cb8a50750a8f9e9d21cc24 (
plain)
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 settings_service_toggle() {
$('.service').each(function() {
var header = $(this).find('h3');
var list = $(this).find('ul');
var content = $(this).find('.form-service');
var elem = $('<a class="service-edit" href="">bearbeiten</a>')
elem.click(function() {
content.toggle();
return false;
});
console.log(list.find('a'))
if(list.find('a').length > 0) {
list.find('a').parent().prepend(elem);
} else {
var li = $('<li></li>');
li.append(elem);
list.append(li);
}
content.hide();
});
}
|