what is backbone.js code example
Example: backbone js
var ships = new Backbone.Collection;
ships.on("add", function(ship) {
alert("Ahoy " + ship.get("name") + "!");
});
ships.add([
{name: "kjnFlying Dutchman"},
{name: "Black Pearl"}
]);
var ships = new Backbone.Collection;
ships.on("add", function(ship) {
alert("Ahoy " + ship.get("name") + "!");
});
ships.add([
{name: "kjnFlying Dutchman"},
{name: "Black Pearl"}
]);