From cbb99f81a165f1da27c847476a6fbe21c235015e Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Fri, 28 Oct 2011 14:48:38 -0700 Subject: [PATCH] Merge multiple jquery ready blocks --- public/javascripts/application.js | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 8b86a344..1ce825ff 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -374,6 +374,13 @@ Event.observe(window, 'load', hideOnLoad); var animationRate = 100; /* jQuery code from #263 */ +// returns viewport height +jQuery.viewportHeight = function() { + return self.innerHeight || + jQuery.boxModel && document.documentElement.clientHeight || + document.body.clientHeight; +}; + /* TODO: integrate with existing code and/or refactor */ jQuery(document).ready(function($) { @@ -465,17 +472,6 @@ jQuery(document).ready(function($) { return false; }); -}); - -// returns viewport height -jQuery.viewportHeight = function() { - return self.innerHeight || - jQuery.boxModel && document.documentElement.clientHeight || - document.body.clientHeight; -}; - -jQuery(document).ready(function($) { - // header animation replacement - no animation, straight appear/hide $("#account .drop-down").unbind('mouseenter').unbind("mouseleave"); //remove the current animated handlers @@ -551,6 +547,4 @@ jQuery(document).ready(function($) { } }); - - });