diff --git a/index.html b/index.html index 6112acffd..d80bf1130 100644 --- a/index.html +++ b/index.html @@ -780,9 +780,7 @@
@@ -1152,25 +1150,15 @@
-var Ship = Backbone.Model.extend({ - defaults: { - "name": "Black Pearl" - } -}); - -var Fleet = Backbone.Collection.extend({ - model: Ship -}); - -var pirates = new Fleet(); +var ships = new Backbone.Collection; -pirates.bind("add", function(ship) { +ships.bind("add", function(ship) { alert("Ahoy " + ship.get("name") + "!"); }); -pirates.add([ +ships.add([ {name: "Flying Dutchman"}, - {captain: "Jack Sparrow"} + {name: "Black Pearl"} ]);