From d6e4da6dad3f82e708cee7baf8793361c239c643 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Wed, 28 Mar 2012 11:17:59 +0800 Subject: [PATCH] Ray's fix for margin-top --- app/assets/javascripts/orbit-1.0.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/orbit-1.0.js b/app/assets/javascripts/orbit-1.0.js index cbb6e0b8..d91e3533 100644 --- a/app/assets/javascripts/orbit-1.0.js +++ b/app/assets/javascripts/orbit-1.0.js @@ -99,7 +99,11 @@ function mainTablePosition() { var $height = $('#main-wrap > .subnav').height() var $table = $('#main-wrap > .table') //alert ($table.height()) - $table.stop().animate({marginTop:$height-17},500) + $height = $height-17; + if($height<0){ + $height = 0; + } + $table.stop().animate({marginTop:$height},500) //$table.css({marginTop : $height}) } $(window).scroll(function () {