25/5/16 period 5
by cjhaley
HTML
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<div id="tabs">
<ul>
<li><a href="#tabs-1">Login</a></li>
<li><a href="#tabs-2">Issues</a></li>
<li><a href="#tabs-3">Voting</a></li>
</ul>
<div id="tabs-1">
<p>
<form>
Login ID:<br>
<input type="text" name="login_Imput"><br>
Login Password:<br>
<input type="text" name="password_Imput">
<input type="submit" value="Login">
</form>
<button class='button'>
Login
</button>
</p>
</div>
<div id="tabs-2">
<p>This content will appear in the second tab</p>
</div>
<div id="tabs-3">
<p>This content in the third</p>
<p>And you can have as much content here as you want.</p>
</div>
</div>
JavaScript
$('.button').click(function() {
var message = "Am I do something";
var result = alert_user(message);
console.log(result);
});
function alert_user(message) {
alert(message);
return true;
}
function login() {
var id_Imput = document.getElementById("login_Imput").value;
var Pass_imput = document.getElementById("password_Imput").value;
if()
}
//testbed tab
$(function() {
$( "#tabs" ).tabs();
});
//array with Voter info
user_array = [];
console.log(user_array);
user_array.push({
id: 02934,
firstName:'jonathon',
lastName: 'mascorella',
password: 'Mas12954'
},
{
id: 02834,
firstName:'Ryan',
lastName: 'Fosse',
password: 'Fos19234'
});