Need some help on scrollTop
I'm trying to incrementally scroll up a div content everytime I click on a button.
The following works well with an actual number.
$('#content').animate({scrollTop: '+=10'});
However if I replace the number with a variable, it fail to work
var num = 10;
$('#content').animate({scrollTop: '+=num'});
What am I missing here?