Skip to content

Instantly share code, notes, and snippets.

@bahrieinn
bahrieinn / carousel.js
Last active December 22, 2015 09:59 — forked from ksolo/carousel.js
Image Carousel
@bahrieinn
bahrieinn / form-validator.js
Last active December 22, 2015 09:48 — forked from ksolo/form-validator.js
Form Validation
// 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>");
@bahrieinn
bahrieinn / zoo.js
Last active December 22, 2015 09:19 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// 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;
}

Instructions:

  1. Download this application skeleton.
  2. Convert the app to use AJAX.
  3. Add any files you changed to your gist and submit your code.