From b8a89ae8d0c45da7b8bfb0ec69efbea2c0ed62ef Mon Sep 17 00:00:00 2001 From: Nick Cammarata Date: Thu, 1 Jul 2010 17:50:35 -0400 Subject: [PATCH] added flashes to main --- index.html | 15 +++++++++++++++ popcorn.js | 7 +++++++ style.css | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index d646b3e..38c477a 100644 --- a/index.html +++ b/index.html @@ -26,6 +26,21 @@ }, function () { $("span", this).text('Collapse'); }); + $('section').hover(function() { + $(this).addClass('hover') + }, function() { + $(this).removeClass('hover') + }) + setInterval(function() { + $('section.hover').each(function() { + if ($(this).attr('hoveron')) { + if ($('video')[0].currentTime-$(this).attr('hoveron')>1) { + $(this).removeAttr('hoveron').removeClass('hover'); + } + } + }) + }, 500); + }); diff --git a/popcorn.js b/popcorn.js index e64a094..c37afc5 100644 --- a/popcorn.js +++ b/popcorn.js @@ -59,6 +59,13 @@ } if (!commandObject.running && commandObject.params["in"] < t && commandObject.params["out"] > t) { commandObject.running = true; + if (typeof commandObject.flash=="undefined") { + var section = $(commandObject.target).parents('section'); + if (!section.hasClass('hover')) { + section.addClass('hover'); + section.attr('hoveron', $('video')[0].currentTime); + } + } commandObject.onIn(); commandObject.displayOverlay(); } diff --git a/style.css b/style.css index 4baea27..ad53e3f 100644 --- a/style.css +++ b/style.css @@ -325,7 +325,7 @@ border: 1px solid #d9d9d9; margin-bottom: 15px; } -section:hover{ +section.hover{ -webkit-box-shadow: -1px 1px 1px #bdc7c6; -moz-box-shadow: -1px 1px 1px #bdc7c6; box-shadow: -1px 1px 1px #bdc7c6; -- 2.43.0