]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
added flashes to main
authorNick Cammarata <nick@nick-laptop.(none)>
Thu, 1 Jul 2010 21:50:35 +0000 (17:50 -0400)
committerNick Cammarata <nick@nick-laptop.(none)>
Thu, 1 Jul 2010 21:50:35 +0000 (17:50 -0400)
index.html
popcorn.js
style.css

index d646b3eddfda027e694cb0a0d900e4bda8b8ed2b..38c477a9e68590c5fec8364507bb1547f7a28888 100644 (file)
       }, 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);
+
     });
   </script>
 </head>
index e64a094dac16d234b32ac3947ee646ffcb572739..c37afc5906b4b54e37cece26046ca827c9b2f166 100644 (file)
         }
         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();
         }
index 4baea27b3857548ba98422a4bd652e396c2797f9..ad53e3f0c66129f0bb6192f57b5e6f387c0b7f52 100644 (file)
--- 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;