1
|
|
|
var TACAPI = {}; |
2
|
|
|
|
3
|
|
|
TACAPI.showTAC = function(anchor) { |
4
|
|
|
|
5
|
|
|
var stateInfo = {pageInfo: 'tac', pageTitle: 'Talent Cloud: Terms and Conditions'}; |
6
|
|
|
document.title = stateInfo.pageTitle; |
7
|
|
|
|
8
|
|
|
TalentCloudAPI.hideAllContent(); |
|
|
|
|
9
|
|
|
|
10
|
|
|
var tacSection = document.getElementById('tacSection'); |
11
|
|
|
tacSection.classList.remove('hidden'); |
12
|
|
|
|
13
|
|
|
var locale = TalentCloudAPI.getLanguageFromCookie(); |
|
|
|
|
14
|
|
|
|
15
|
|
|
// New Subpage Hero Scripts |
16
|
|
|
|
17
|
|
|
Utilities.getHeroElements(); |
|
|
|
|
18
|
|
|
|
19
|
|
|
var tacHeroTitle = document.getElementById("tacHeroTitle"); |
20
|
|
|
tacHeroTitle.classList.remove("hidden"); |
21
|
|
|
tacHeroTitle.setAttribute("aria-hidden", "false"); |
22
|
|
|
|
23
|
|
|
// Google Analytics |
24
|
|
|
|
25
|
|
|
ga('set', 'page', '/tac'); |
26
|
|
|
ga('send', 'pageview'); |
27
|
|
|
|
28
|
|
|
// alert(anchor); |
29
|
|
|
|
30
|
|
|
if (anchor == null) { |
|
|
|
|
31
|
|
|
history.pushState(stateInfo, stateInfo.pageInfo, '#TAC'); |
|
|
|
|
32
|
|
|
window.scrollTo(0, 0); |
33
|
|
|
} |
34
|
|
|
else if (anchor === "tacSection1") { |
35
|
|
|
history.pushState(stateInfo, stateInfo.pageInfo, '#TAC/tacSection1'); |
36
|
|
|
setTimeout(function() { |
37
|
|
|
document.getElementById("tacSection1").scrollIntoView(true); |
38
|
|
|
}, 800); |
39
|
|
|
} |
40
|
|
|
else if (anchor === "tacSection2") { |
41
|
|
|
history.pushState(stateInfo, stateInfo.pageInfo, '#TAC/tacSection2'); |
42
|
|
|
setTimeout(function() { |
43
|
|
|
document.getElementById("tacSection2").scrollIntoView(true); |
44
|
|
|
}, 800); |
45
|
|
|
} |
46
|
|
|
else if (anchor === "tacSection3") { |
47
|
|
|
history.pushState(stateInfo, stateInfo.pageInfo, '#TAC/tacSection3'); |
48
|
|
|
setTimeout(function() { |
49
|
|
|
document.getElementById("tacSection3").scrollIntoView(true); |
50
|
|
|
}, 800); |
51
|
|
|
} |
52
|
|
|
else if (anchor === "tacSection4") { |
53
|
|
|
history.pushState(stateInfo, stateInfo.pageInfo, '#TAC/tacSection4'); |
54
|
|
|
setTimeout(function() { |
55
|
|
|
document.getElementById("tacSection4").scrollIntoView(true); |
56
|
|
|
}, 800); |
57
|
|
|
} |
58
|
|
|
else if (anchor === "tacSection5") { |
59
|
|
|
history.pushState(stateInfo, stateInfo.pageInfo, '#TAC/tacSection5'); |
60
|
|
|
setTimeout(function() { |
61
|
|
|
document.getElementById("tacSection5").scrollIntoView(true); |
62
|
|
|
}, 800); |
63
|
|
|
} |
64
|
|
|
else if (anchor === "tacSection6") { |
65
|
|
|
history.pushState(stateInfo, stateInfo.pageInfo, '#TAC/tacSection6'); |
66
|
|
|
setTimeout(function() { |
67
|
|
|
document.getElementById("tacSection1").scrollIntoView(true); |
68
|
|
|
}, 800); |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
}; |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.