implement initial code for tutorial

This commit is contained in:
Kyle Drake 2015-10-13 15:59:13 -07:00
parent 6fcc43297b
commit d018e9df2d
11 changed files with 162 additions and 28 deletions

View file

@ -12,14 +12,22 @@
What's your name?
</div>
<div style="position: absolute; left: 460px; top:840px;">
<input type="text" placeholder="First Name" style="position: relative">
<a class="btn btn-active">Submit</a>
<input id="nameInput" type="text" placeholder="First Name" style="position: relative">
<button id="checkButton" class="btn btn-active">Submit</button>
</div>
</div>
<script>
function checkHomework(editor) {
alert('this checks homework, but its true for now')
return true
$('#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>