I'm facing an issue with a DIV class that I've set up like this:
div.map_view{
height: 420px;
transition: height 2s;
-moz-transition: height 2s; /* Firefox 4 */
-webkit-transition: height 2s; /* Safari and Chrome */
-o-transition: height 2s; /* Opera */
}
The objective here is to have the DIV animate a scroll when the height is changed (in this case, going up). However, when I try to change the height in my script using:
document.getElementById('map_view').style.height = '0px';
, it simply disappears without any animation. Strangely enough, if I comment out this line and run the exact same code in my JS debugger, the animation works perfectly.
What could be causing this behavior? Am I missing something that is preventing it from working as intended in my script?