Last active
December 16, 2015 01:30
-
-
Save carsontang/5356013 to your computer and use it in GitHub Desktop.
JavaScript differences?
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
// Version A: Works | |
WO.workouts = { | |
init: function() { | |
WO.workouts.index.init(); | |
} | |
}; | |
WO.workouts.index = { | |
init: function() { | |
$('.calendar td').click(function(){ | |
alert("TO-DO: You've clicked a calendar cell!"); | |
}); | |
} | |
}; | |
// Version B: Doesn't work | |
WO.workouts.index = { | |
init: function() { | |
$('.calendar td').click(function(){ | |
alert("TO-DO: You've clicked a calendar cell!"); | |
}); | |
} | |
}; | |
WO.workouts = { | |
init: function() { | |
WO.workouts.index.init(); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment