This file contains hidden or 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 posts = [] | |
| var post = { | |
| url: 'http://jsonplaceholder.typicode.com/posts/', | |
| $el: $('<div class="post">').appendTo($('body')), | |
| initialize: function(id){ | |
| this.$el.attr('id', id) | |
| this.url += id | |
| var thisPost = this // wtf? http://stackoverflow.com/questions/4886632/what-does-var-that-this-mean-in-javascript | |
| $.get( this.url, function(data){ | 
  
    
      This file contains hidden or 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 to_be_run_on_server_response = function(weather_data){ | |
| $('#container').append(weather_data.main.temp) | |
| } | |
| $.get('http://api.openweathermap.org/data/2.5/weather?q=San%20Francisco&mode=json&units=imperial').success(to_be_run_on_server_response) | 
  
    
      This file contains hidden or 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
    
  
  
    
  | $.ajax({ | |
| method: 'GET', | |
| url: 'http://api.openweathermap.org/data/2.5/weather?q=San%20Francisco&mode=json&units=imperial', | |
| success: function(weather_data){ | |
| console.log(weather_data) | |
| } | |
| }) | 
  
    
      This file contains hidden or 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 complex_object = { | |
| string: "I'm a string!", | |
| number: 42, | |
| array: ["all sorts of stuff", 10, true, undefined, {me: "an object", more: "find me in here!"}, function(){console.log('beepity-beep')}], | |
| simple_object: {name: 'bob', location: 'basement'}, | |
| fn: function(){ | |
| console.log("fn has been invoked! Checking both kinds of invocation-time inputs...") | |
| console.log("what is my calling context?", this) | |
| console.log("what are my arguments?", arguments) | |
| } | 
  
    
      This file contains hidden or 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 them_dogs = [{ | |
| name: 'Henry', | |
| age: 0.5, | |
| breed: 'Aussie', | |
| food: 'kibble', | |
| toys: ['tennis ball', 'chew toy'], | |
| picture: 'http://rubyriverminiaustralianshepherds.com/wp-content/uploads/aussie-puppy-for-sale-940x412.jpg' | |
| }, { | |
| name: 'Tilly', | |
| age: 5, | 
  
    
      This file contains hidden or 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="en"> | |
| <head> | |
| <style> | |
| body { | |
| margin: 0 auto; | |
| width:960px; | |
| } | |
| </style> | 
  
    
      This file contains hidden or 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
    
  
  
    
  | <html> | |
| <head> | |
| </head> | |
| <body> | |
| <h1>mah payge</h1> | |
| <p>yup, yup</p> | |
| <script> | |
| // the interpreter will skip any line that starts with a double slash | |
| // these lines are explanatory comments to help squishy-brained humans | 
  
    
      This file contains hidden or 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
    
  
  
    
  | <form action="form-responses/new" method="POST"> | |
| <input type="text" name="firstname" value="default" size="100" autofocus> | |
| <input type="password" name="pswd"> | |
| <input type="email" name="userEmail" placeholder="hello@site.com"> | |
| <input type="radio" name="weird" value="code-blue" checked><span>pick this!</span> | |
| <input type="radio" name="weird" value="code-red" checked><span>or pick this</span> | |
| <input type="checkbox" name="optin" value="trusting" checked>You agree to everything | |
| <input type="checkbox" name="optout" value="skeptical" disabled>Wait, what? | 
Make a very boxy web page...
- Create a bunch of dang divs and spans on your page.
 - This is a web page about boxes. Add content about boxes. Cardboard boxes, metal boxes, self-imposed emotional boxes, whatever...
 - Using a mix of class, id, and tag selectors, give boxes different background-colors.
 - Give boxes a set height, width, border, padding, and margin.
 - Figure out what "giving" an element each of these css rules does:
 - border-radius: 10px;
 
NewerOlder
        