neocities/views/tutorial/html/1.erb
2015-10-13 15:59:13 -07:00

33 lines
1 KiB
Text

<div class="comic" style="height: 967px; background-image: url(/img/tutorial/ch1pg1.png);">
<div class="dialogue" style="left: 270px; top:374px;">
Oh, a new student!
</div>
<div class="dialogue" style="left: 570px; top:374px;">
Ahem, please come in!
</div>
<div class="dialogue" style="left: 50px; top:630px;">
I'm Penelope, and I'll be your teacher.
</div>
<div class="dialogue" style="left: 330px; top:630px;">
What's your name?
</div>
<div style="position: absolute; left: 460px; top:840px;">
<input id="nameInput" type="text" placeholder="First Name" style="position: relative">
<button id="checkButton" class="btn btn-active">Submit</button>
</div>
</div>
<script>
$('#checkButton').on('click', function(button) {
checkHomework($('#nameInput').val())
})
function checkHomework(name) {
if(name == '' || name == undefined)
alert("I need to know your name!")
else {
sessionStorage.setItem('name', name)
window.location.href = '/tutorial/html/2'
}
}
</script>