game /js/collection/gallery.js

Language Javascript Lines 25
MD5 Hash a2673313fe02d419a1019935d9238b4d
Repository https://github.com/onesime/game.git View Raw File
| Open JSFiddle
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Collection
var hetic = hetic || {};

(function(){
	"use strict";
	var Gallery = Backbone.Collection.extend({
		model: hetic.Student,
		initialize: function(){
			this.on('add', this.render);
		},
		render: function(model){
			$("#student-list").prepend( model.view.render().el );
		}
	});
	hetic.gallery = new Gallery();



	hetic.gallery.create({firstname: 'Anthony', lastname: 'Zaccardi', image: 'img/zaccardi.png', promotion: 2015, website:"http://www.anthonyzaccardi.com/", capacities: ['html']});
	hetic.gallery.create({firstname: 'Arnaud', lastname: 'Pichon', image: 'img/arnaud.png', promotion: 2015, website:"http://www.onesime.fr", capacities: ['html', 'backbone']});
	hetic.gallery.create({firstname: 'Mathieu', lastname: 'Dutto', image: 'img/mathieu.jpg', promotion: 2015, website:"http://www.mathieudutto.fr", capacities: ['html', 'css', 'php']});


	
}());
Back to Top