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
| (function() { | |
| var acceleration = { | |
| x:0, | |
| y:0 | |
| }; | |
| var div; | |
| var init = function(){ | |
| div = document.getElementById("anObject"); |
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> | |
| <head> | |
| <title>Clock</title> | |
| </head> | |
| <style> | |
| *{ | |
| margin:0; | |
| padding:0; | |
| } |
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 App | |
| constructor: -> | |
| $('.fullscreen').click @fullscreen | |
| $('#display').click -> $(@).hide() | |
| @started = true | |
| @loop() | |
| fullscreen: -> | |
| $('#display').html $(@).parent().html() | |
| $('#display').show() |
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
| src = 'whatever.png' | |
| img = document.createElement 'img' | |
| img.src = whatever | |
| img.onload = -> | |
| console.log 'img loaded' | |
| document.body.appendChild img |
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
| .news{ | |
| background:white; | |
| border-radius:4px; | |
| padding:16px; | |
| } | |
| .news section{ | |
| border:1px solid #ccc; | |
| padding:7px; | |
| } |
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
| *{ | |
| margin:0; | |
| padding:0; | |
| } | |
| div.container{ | |
| color:white; | |
| font-weight:normal;display:block; | |
| width:auto; | |
| } | |
| #button1 {font-weight: bold;background-color: red; |
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
| *{ | |
| margin:0; | |
| padding:0; | |
| } | |
| .race-conditions{ | |
| color:white; | |
| font-weight:bold; | |
| } | |
| .race-conditions button{ | |
| padding:8px; |
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
| describe 'player movement', -> | |
| it 'moves up when clicked', -> | |
| playerStartPosition = $('.player').offset().top | |
| $('button.up').trigger('click') | |
| playerEndPosition = $('.player').offset().top | |
| expect(playerStartPosition).not.toBe playerEndPosition | |
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 clicky = function(event){ | |
| $(event.currentTarget).addClass('stupid'); | |
| }; | |
| $('.container').on({ | |
| click: clicky, | |
| mouseover: clicky | |
| }, '.child'); |
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
| window.alex = {} | |
| class window.alex.Wheel | |
| constructor: (id)-> | |
| console.log id | |
| rotate: -> | |
| console.log 'turning' | |
| class window.alex.Car | |
| constructor: -> |