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 Cat = Backbone.Model.extend({ | |
initialize: function(){ | |
_(this).bindAll( 'bindEvents', 'action', 'dispose' ); | |
this.bindEvents(); | |
}, |
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
// | |
// What Javascript is Made of | |
// It ain't sugar, spice, and everything nice, but it'll do | |
// | |
/////////////////////////////////////////////////////////////////////////////////////// | |
// Variables | |
// Javascript is reference based, meaning that variables only ever point to a piece of data. Defining a variable lets you use a piece of data elsewhere. |
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
<h1>Isn't Terse <strong>awesome</strong>?!!!</h1> | |
<a href="http://www.youtube.com/watch?v=ygI-2F8ApUM">Yes</a> | |
<a href="http://www.youtube.com/watch?v=cRrdP8bUZI4">No</a> |
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
<h1>I AM <em>TRANSFORMED</em></h1> |
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
<img src="http://upload.wikimedia.org/wikipedia/commons/2/2a/Wikipe-tan_in_navy_uniform2_transparent.png" /> |
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 myFunc = function( a, b ){ | |
return a+b; | |
}; | |
// OR!!!! | |
var myFunc = function( a, b ){ | |
return arguments[0] + arguments[1]; | |
}; |
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 convertYouTubeDuration = function( yt_duration ){ | |
var time_extractor = /([0-9]*)M([0-9]*)S$/; | |
var extracted = time_extractor.exec( yt_duration ); | |
var minutes = parseInt( extracted[1], 10 ); | |
var seconds = parseInt( extracted[2], 10 ); | |
var duration = ( minutes * 60 ) + seconds; | |
return duration; | |
}; |
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 PlaylistItem = function( params ){ | |
// ensure params exists | |
params = params || {}; | |
// cache a reference to this | |
var playlist_item = this; | |
// attach arguments to new PlaylistItem instance | |
this.title = params.title; |
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="game"> | |
<table id="board"> | |
<tr> | |
<td></td> | |
<td></td> | |
<td></td> | |
</tr> | |
<tr> | |
<td></td> | |
<td></td> |
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
<form id="placeholder_test"> | |
<input name="test" type="text" placeholder="Placeholder Text" /> | |
<button type="submit">Submit</button> | |
</form> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-placeholder/2.0.7/jquery.placeholder.min.js"></script> |
OlderNewer