-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
38 lines (35 loc) · 1.59 KB
/
app.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
28
29
30
31
32
33
34
35
36
37
38
$('#login').click(function() {
var loginGrtr = G$('Jokester');
var setIntro = J$();
var setInstructions = J$();
var setSetup = J$();
var setClimax = J$();
var setPunchline = J$();
var setJokeOutput = J$();
$('#logindiv').hide();
$('#logoutdiv').css("visibility","visible");
$('.jumbotron').css("visibility","visible");
$('.form-inline').css("visibility","visible");
setIntro.setLang($('#lang').val()).HTMLIntro('#jokeintro', true);
setInstructions.setLang($('#lang').val()).HTMLInstructions('#jokeinstructions',true);
setSetup.setLang($('#lang').val()).HTMLSetup('#jokesetup',true);
setClimax.setLang($('#lang').val()).HTMLClimax('#jokeclimax',true);
setPunchline.setLang($('#lang').val()).HTMLPunchline('#jokepunchline',true);
setJokeOutput.setLang($('#lang').val()).HTMLJokeOutput('#jokeoutputlabel',true);
loginGrtr.setLang($('#lang').val()).HTMLGreeting('#greeting',true).logIn();
setTimeout(function(){
$("#greeting").hide()}, 1000)
$('#greeting').css("display","block");
})
$('#logout').click(function() {
var logOut = G$('Jokester')
$('#logindiv').show();
$('#logoutdiv').css("visibility","hidden");
$('.jumbotron').css("visibility","hidden");
$('.form-inline').css("visibility","hidden");
$('#greeting').hide();
logOut.setLang($('#lang').val()).logOut();
})
$('#submit').click(function() {
document.getElementById('jokeoutputcontent').innerText = document.getElementById('jokesetupinput').value + ' ' + document.getElementById('jokeclimaxinput').value+ ' ' + document.getElementById('jokepunchlineinput').value;
})