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 randNum = function(max) { | |
return Math.floor(Math.random() * max); | |
} |
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
200 OK - | |
General status code. Most common code used to indicate success. | |
201 CREATED - | |
Successful creation occurred (via either POST or PUT). | |
Set the Location header to contain a link to the newly-created resource (on POST). | |
Response body content may or may not be present. | |
204 NO CONTENT - | |
Indicates success but nothing is in the response body, often used for DELETE and PUT operations. |
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
.video > .video-wrapper { | |
position: relative; | |
width: 100%; | |
padding-top: 56.25%; | |
} | |
.video > .video-wrapper iframe, | |
.video > .video-wrapper object, | |
.video > .video-wrapper embed { | |
position: absolute; | |
height: 100%; |
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
body { | |
background: url('img.jpg')no-repeat center center fixed; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
} |
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
.parent { width: 200px; } | |
.child { max-width: 100%; height: auto; } |
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
javascript:(function(){window.open(document.URL, '','width=320,height=480');})(); |
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
window.getComputedStyle(element, null).getPropertyValue(“css-selector”); |
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
<iframe src="index.html" style="display:block; width:100%!important; height:100%!important;" /> |
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
Question 1 | |
Write a JavaScript snippet that uses console.log to print all the numbers from 1 to 100, with two exceptions. For numbers divisible by 3, print "Fizz" instead of the number, and for numbers divisible by 5 (and not 3), print "Buzz" instead. | |
When you have that working, modify your program to print "FizzBuzz", for numbers that are divisible by both 3 and 5 (and still print "Fizz" or "Buzz" for numbers divisible by only one of those). | |
Question 2 | |
Listen for an event on the unordered list in the provided html that uses event propagation correctly. On click, each button should log its inner html to the console. | |
Use the following html: | |
<!DOCTYPE html> | |
<html> |
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> | |
<head> | |
<meta name="author" content="DAVIDPM 2015, davidpm.io"> | |
<title>Custom Cross-Browser File Input</title> | |
<style type="text/css"> | |
.wrapper { | |
margin: 5%; | |
padding: 5%; | |
border: 1px solid #aaa; |
OlderNewer