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
table { counter-reset: line-number; } | |
tbody > tr > td:first-child:before { | |
content: counter(line-number) "."; | |
counter-increment: line-number; | |
padding-right: 0.3em; | |
} |
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 renderPoin = _.after(data.models.length, function() { | |
// lakukan sesuatu disini | |
}); |
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.Zoo = Backbone.Collection.extend({ | |
model:Makhluk, | |
url:"./api/makhluk", | |
initialize: function() { | |
this.deferred = this.fetch(); | |
} | |
}); |
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
RouterKu = Backbone.Router.extend({ | |
routes: { | |
"sini/sana" : "bertindak" | |
}, | |
bertindak: function(){ | |
// lakukan sesuatu disini | |
} | |
}); |
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.LoginView = new LoginView({model: new Pembenaran()}); |
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
events: { | |
"click #login": "login" | |
} |
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
el: $("#login-form") |
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
<form action="/login" id="login-form"> | |
Nama pengguna: <input type="text" id="nPengguna"><br> | |
Kata Laluan: <input type="password" id="kLaluan"><br> | |
<button id="login">Masuk</button> | |
</form> |
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 modelKu = Backbone.Model.extend({}); | |
modelDia = new modelKu(); | |
modelDia.bind("change", function(model, collection){ | |
alert("ada perubahanlah: " + model.get('some_attribute')); | |
}); | |
modelDia.set({some_attribute: "nilai untuk sesuatu"}); |