diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/abmahn.js | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/js/abmahn.js b/js/abmahn.js index 353111b..6b26e0b 100644 --- a/js/abmahn.js +++ b/js/abmahn.js | |||
@@ -12,14 +12,22 @@ function setText(input, text) { | |||
12 | document.getElementById(input).value = text; | 12 | document.getElementById(input).value = text; |
13 | } | 13 | } |
14 | 14 | ||
15 | function step0_done() { document.getElementById('wrapper').className = 'wrapper step1'; } | 15 | function scroll(id) { |
16 | function step1_cancel() { document.getElementById('wrapper').className = 'wrapper stepcancel'; } | 16 | document.getElementById(id).scrollIntoView(); |
17 | function step1_done() { document.getElementById('wrapper').className = 'wrapper step2'; } | 17 | } |
18 | function step2_done() { document.getElementById('wrapper').className = 'wrapper step3'; } | 18 | |
19 | function step3_done() { document.getElementById('wrapper').className = 'wrapper step4'; } | 19 | function setClass(id, classes) { |
20 | function step4_done() { document.getElementById('wrapper').className = 'wrapper step5'; } | 20 | document.getElementById(id).className = classes; |
21 | function step5_done() { document.getElementById('wrapper').className = 'wrapper step6'; } | 21 | } |
22 | function step6_done() { document.getElementById('wrapper').className = 'wrapper step7'; } | 22 | |
23 | function step0_cancel() { setClass('wrapper', 'stepcancel'); } | ||
24 | function step0_done() { setClass('wrapper', 'step1'); scroll('head1'); } | ||
25 | function step1_done() { setClass('wrapper', 'step2'); scroll('head1'); } | ||
26 | function step2_done() { setClass('wrapper', 'step3'); scroll('head2'); } | ||
27 | function step3_done() { setClass('wrapper', 'step4'); scroll('head3'); } | ||
28 | function step4_done() { setClass('wrapper', 'step5'); scroll('head4'); } | ||
29 | function step5_done() { setClass('wrapper', 'step6'); scroll('head5'); } | ||
30 | function step6_done() { setClass('wrapper', 'step7'); scroll('head6'); } | ||
23 | 31 | ||
24 | function waldorff() { | 32 | function waldorff() { |
25 | setText('abmahnender_kanzlei', 'Waldorff & Frommer RAe'); | 33 | setText('abmahnender_kanzlei', 'Waldorff & Frommer RAe'); |