How can I use the scrolltop without an animation
This code works:
var offTop = $(\'#box\').offset().top;
offTop = offTop-43;
$(\'#mainCt\').animate(
Why not use it with less duration. I fiddled it and it had no animation. SInce there will be no time to see the animation, there will be no animation at all.
var offTop = $('#box').offset().top;
offTop = offTop-43;
$('#mainCt').animate({scrollTop: '+=' + offTop + 'px'}, 50); //50 added here as duartion