diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-10-24 15:47:06 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-10-24 15:47:06 -0400 |
| commit | ee834da028053b18cf64b031022337fe78a717a3 (patch) | |
| tree | 8860b35071fef377c0e7d31a1920e5bf963be281 /public/assets/javascripts/ui/site/HomeView.js | |
| parent | 47f77566c31e9d14f5afc199c217dbdaabd54037 (diff) | |
move code into homeview
Diffstat (limited to 'public/assets/javascripts/ui/site/HomeView.js')
| -rw-r--r-- | public/assets/javascripts/ui/site/HomeView.js | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/public/assets/javascripts/ui/site/HomeView.js b/public/assets/javascripts/ui/site/HomeView.js index 02f9ab9..ba2ead3 100644 --- a/public/assets/javascripts/ui/site/HomeView.js +++ b/public/assets/javascripts/ui/site/HomeView.js @@ -6,6 +6,28 @@ var HomeView = View.extend({ load: function() { this.projectList = new ProjectList () - } + + var player = $f( okplayer ) + player.addEvent('ready', function(){ + player.addEvent('finish', function(){ + hide() + }) + }) + $('.hero .circle').click( function(){ + $('.videoModal').css("display","table").addClass('active'); + player.api('play') + }) + + $('.videoModal .ion-ios7-close-empty').click( function(){ + player.api('pause') + hide() + }) + + function hide() { + $('.videoModal').fadeOut(300, function(){ + $('.videoModal').removeClass('active') + }) + } + }, }) |
