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
Handlebars.registerHelper('fullName', function(person) { | |
return person.firstName + " " + person.lastName; | |
}); |
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
/* SPRITE STYLES */ | |
@import "snails/*.png"; | |
@mixin sprite_css($name) { | |
@include snails-sprite($name); | |
height: snails-sprite-height($name); | |
width: snails-sprite-width($name); | |
} | |
.options { | |
.option1{ |
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
<div class="container"> | |
<a class="btn green" href="#">Button 1</a> | |
<div class="options"> | |
<a class="option1"></a> | |
<a class="option2"></a> | |
<a class="option3"></a> | |
</div> | |
</div> |
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
class Step | |
constructor: (@name) -> | |
move: (meters) -> | |
alert "Moving " + @name + " #{meters} steps" | |
class SmallSteps extends Step | |
move: -> | |
super 5 | |
class LargeSteps extends Step |
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
race = (winner, runners...) -> | |
alert "The winner is: #{winner}. Others that ran were: #{runners}" | |
race ["Adam","Mark","Luke","John"]... |
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
family = | |
mum: | |
name: "Jane" | |
age: 34 | |
dad: | |
name: "Jon" | |
age: 37 | |
son: | |
name: "Mark" | |
age: 12 |
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
tmpvar = setNumber | |
try | |
setNumber += 5 | |
alert setNumber | |
catch error | |
alert error | |
finally | |
setNumber = tmpvar |
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
switch setNumber | |
when 41 then alert 'Snake' | |
when 42 then alert 'Dog' | |
when 43 then alert 'Cat' | |
else alert 'No animal present' |
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
# removed in compiler | |
### | |
Remains after Compile | |
### | |
/* | |
This is not allowed in Coffee Script, use ### like above | |
*/ |
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
$ -> | |
$('.assignedNumber').click -> | |
alert setNumber |