I am trying to get a div to increase in height but moving upwards instead of downwards, this happens almost every second (on a realtime event):
height++;
$("#bar").height(height);
But right now the top of the box stays in the same position while the bottom of the bar goes down. I want the bottom of the bar to stay where it is while the top moves up with each event. I hope this makes sense, any advice would help thank you!
UPDATE: The CSS of the bar:
#bar
{
width:20px;
height:0px;
display: block;
background-color: blue;
}
The
divwill animate bottom to top unless you attach it by the bottom css style. For examplehttp://jsfiddle.net/robert/BWwyf/
then
This will animate from the top to the bottom