summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/site/ProfileView.js
blob: 41f04ef9a291b962e151437c98257f50eac06224 (plain)
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
26
27
28
29
var ProfileView = View.extend({

	initialize: function(){
	},

	load: function(){
		var classes = ['one', 'two', 'three', 'four',
		               'five', 'six', 'seven', 'eight',
		               'nine', 'ten', 'eleven', 'twelve',
		               'thirteen'];
		$(".bio").addClass(choice(classes));
		
		$("td.border").each(function(){
			var iframe = $(this).find("iframe").get('0')
			if (! iframe) return
			console.log(iframe)
			$(this).on({
				mouseenter: function(e){
					iframe.contentWindow.postMessage("spin-on", window.location.origin)
				},
				mouseleave: function(e){
					iframe.contentWindow.postMessage("spin-off", window.location.origin)
				}
			})
		})
	}

})