Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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"}
]);
Source by backbonejs.org #
 
PREVIOUS NEXT
Tagged: #backbone #js
ADD COMMENT
Topic
Name
8+6 =