diff options
| author | Teddy Wing | 2013-04-28 10:27:31 -0400 | 
|---|---|---|
| committer | Teddy Wing | 2013-04-28 10:27:31 -0400 | 
| commit | 51e8ccc4efbf9fe5b5e88c7fa587672a83e8e035 (patch) | |
| tree | 31cf5815c794b731e2c193964b663f53d1124afc /public/javascripts/main.js | |
| parent | 4df9ef2b095779409c510b811f64352f102d1170 (diff) | |
| download | Who-am-I-51e8ccc4efbf9fe5b5e88c7fa587672a83e8e035.tar.bz2 | |
Change to different coverflow plugin
Diffstat (limited to 'public/javascripts/main.js')
| -rw-r--r-- | public/javascripts/main.js | 28 | 
1 files changed, 16 insertions, 12 deletions
| diff --git a/public/javascripts/main.js b/public/javascripts/main.js index a3c54c5..df3b899 100644 --- a/public/javascripts/main.js +++ b/public/javascripts/main.js @@ -1,17 +1,17 @@  // CoverFlow  (function() { -	var initialise_content_flow = function() { -		var cf = new ContentFlow('character-select', { -			reflectionColor: "#000000", -		 -			onclickActiveItem: function(item) { -				alert('hello'); -			} +	var initialise_js_cover_flow = function(playlist) { +		coverflow('character-select-container').setup({ +			width: '100%', +			playlist: playlist, +			coverheight: 200, +			textoffset: 30 +		}).on('ready', function() { +			this.on('click', function() { +				alert('chosen'); +			});  		}); -		 -		return cf;  	}; -	// initialise_content_flow();  	// Populate characters @@ -21,7 +21,6 @@  	};  	var $character_container = $('#character-select .flow'); -	var character_template = _.template($('#character-image-template').html());  	$.get(  		'/character-images/8680539',  		function(response) { @@ -29,9 +28,14 @@  			$character_container.empty() +			var playlist = []  			for (var i = 0; i < r.characters.length; i++) { -				$character_container.append(character_template(r.characters[i])); +				playlist.push({ +					image: r.characters[i].image, +					title: r.characters[i].name +				});  			} +			initialise_js_cover_flow(playlist);  		}  	);  })();
\ No newline at end of file | 
