- Download this application skeleton.
- Convert the app to use AJAX.
- Add any files you changed to your gist and submit your code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shorthand for $(document).ready(); | |
$(function(){ | |
$("#next_frame").click(function() { | |
var right_val = parseInt($(".frames > li").css("right").replace(/px/,'')); | |
if (right_val > 700) { | |
$(".frames > li").animate({"right": "0px"}, "fast"); | |
} else { | |
$(".frames > li").animate({"right": "+=360px"}, "fast"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// shorthand for $(document).ready(); | |
$(document).ready(function(){ | |
$("form").submit(function(e) { | |
e.preventDefault(); | |
var emailInput = $("input").first().val(); | |
var passwordInput = $("input").last().val(); | |
if (!validateEmail(emailInput)) { | |
$("#errors").append("<li>Invalid Email</li>"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------------------------------------------------------------------------------------------------------------------ | |
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here. | |
//------------------------------------------------------------------------------------------------------------------ | |
// Animal Constructor | |
function Animal(name, legs){ | |
this.name = name; | |
this.legs = legs; | |
} |