Created
May 29, 2013 15:46
-
-
Save hikarock/5671325 to your computer and use it in GitHub Desktop.
BACKBONE.JSガイドブック1-3
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; | |
border: 0; | |
} | |
body { | |
background: #ddf; | |
font: 30px sans-serif; | |
} |
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
<p id='helloWorld'></p> |
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 Parent = Backbone.View.extend({ | |
i_property: 1, | |
i_method: function () { | |
console.log("i"); | |
}, | |
initialize: function() { | |
console.log("hello!"); | |
}, | |
constructor: function() { | |
console.log("constructor"); | |
} | |
}, { | |
c_property: 2, | |
c_method: function () { | |
console.log("c"); | |
} | |
} | |
); | |
console.log(Parent.c_property); | |
Parent.c_method(); | |
var parent = new Parent; | |
console.log(parent.i_property); | |
parent.i_method(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment