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
<!DOCTYPE html> | |
<html class="no-js"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width"> | |
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
for (var i = 0; i < allImgs.length; i++) | |
//shorthand | |
for(var i in allImgs) | |
//with array | |
function logArrayElements(element, index, array) { | |
console.log("a[" + index + "] = " + element); | |
} | |
[2, 5, 9].forEach(logArrayElements); |
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
<!DOCTYPE html> | |
<html lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.10.1/TweenMax.min.js"></script> | |
<script> | |
$(function(){ |
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
/*! | |
* jQuery Cycle Plugin | |
* Examples and documentation at: http://jquery.malsup.com/cycle/ | |
* Copyright (c) 2007-2013 M. Alsup | |
* Version: 3.0.2 (19-APR-2013) | |
* Dual licensed under the MIT and GPL licenses. | |
* http://jquery.malsup.com/license.html | |
* Requires: jQuery v1.7.1 or later | |
*/ | |
;(function($, undefined) { |
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
// object constructor: | |
function Person(job, married) { | |
this.job = job; | |
this.married = married; | |
} | |
//function that logs info to console | |
function logger(x){ | |
console.log(x) | |
} |
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
var nyc = { | |
fullName: "New York City", | |
mayor: "Michael Bloomberg", | |
population: 8000000, | |
boroughs: 5 | |
}; | |
//This loop will output ALL the properties of this object | |
for(var i in nyc){ |
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
<div id="output"></div> |
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
//create an object | |
var friends = {}; | |
//add people to it | |
friends.bill = { //observe this declaration as bill is an object of friends | |
firstName: "Bill", | |
lastName: "Gates", | |
number: "(206) 555-5555", | |
address: ['One Microsoft Way','Redmond','WA','98052'] | |
}; |
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
<button>update</button> | |
<input type="text" value="10" /> <br /> | |
<label></label> |
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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
NewerOlder