diff options
| author | Jesse Morgan <jesse@jesterpm.net> | 2013-09-22 16:21:03 -0700 | 
|---|---|---|
| committer | Jesse Morgan <jesse@jesterpm.net> | 2013-09-22 16:21:03 -0700 | 
| commit | e18831fb897c7b9ea7bf7045ebaaf00f94e01acc (patch) | |
| tree | c737cc0117970b6ad941dcaf0e870c50c89e8316 /web | |
| parent | 7b85c3c92a56ef2070cd99c6c53c2ae7e2b45f9b (diff) | |
Fixing chrome bug with hero video
Diffstat (limited to 'web')
| -rw-r--r-- | web/scripts/growth.js | 35 | ||||
| -rw-r--r-- | web/style.css | 2 | 
2 files changed, 22 insertions, 15 deletions
diff --git a/web/scripts/growth.js b/web/scripts/growth.js index a79465c..6571273 100644 --- a/web/scripts/growth.js +++ b/web/scripts/growth.js @@ -37,21 +37,23 @@ $(document).ready(function()      });      var previousAnswer = $("#answerField").val(); -    if (!isNaN(previousAnswer)) { -        var range = $('.sliderQuestion .sliderbar').width() - 46; -        var left = previousAnswer * range - range / 2; -        $('.sliderQuestion .slider').css('left', left); -    } else { -        var index = previousAnswer.indexOf(',') -        if (index != -1) { -            var x = previousAnswer.substr(0, index); -            var y = previousAnswer.substr(index + 1); -            if (!isNaN(x) && !isNaN(y)) { -                var posX = x * 125 + 125; -                var posY = -y * 125 + 125; -                $('.quadQuestion .selector').css({left:posX,top:posY}); -            } +    if (previousAnswer != undefined) { +        if (!isNaN(previousAnswer)) { +            var range = $('.sliderQuestion .sliderbar').width() - 46; +            var left = previousAnswer * range - range / 2; +            $('.sliderQuestion .slider').css('left', left); +        } else { +            var index = previousAnswer.indexOf(',') +            if (index != -1) { +                var x = previousAnswer.substr(0, index); +                var y = previousAnswer.substr(index + 1); +                if (!isNaN(x) && !isNaN(y)) { +                    var posX = x * 125 + 125; +                    var posY = -y * 125 + 125; +                    $('.quadQuestion .selector').css({left:posX,top:posY}); +                } +            }          }      } @@ -69,6 +71,11 @@ $(document).ready(function()              e.target.src = url.replace('-hover.jpg', '.jpg');          }      }); + +    var video = document.getElementById("herovideo"); +    if (video != null) { +        video.removeAttribute("controls"); +    }  });  function notice(msg) diff --git a/web/style.css b/web/style.css index 17c1a21..17489f9 100644 --- a/web/style.css +++ b/web/style.css @@ -101,7 +101,7 @@ nav.primary a.current {  }  #hero { -    background: #2a2d2a no-repeat top center; +    background: #2b2c2b no-repeat top center;      width: 100%;      color: white;      text-align: center;  | 
