I want to change the bottom property of an element.
I want it to have different delays on bottom increase and decrease, but if I set:
transition-property: bottom;
transition-delay: 0.3s;
-moz-transition-delay: 0.3s;
-webkit-transition-delay: 0.3s;
The js code:
set_bottom = function(control_bar_height){
if(is_user_active){
document.getElementById("video-link").style.bottom = control_bar_height + 30 + 'px';
}else{
document.getElementById("video-link").style.bottom = 30 + 'px';
}
};
this.on("useractive", function () {
is_user_active = true;
set_bottom(this.controlBar.height());
});
it will set both bottom increase and decrease delays to 0.3s.
How may I do this?