here i have this code which i manage to get what i want but its working only first run idk y may if u can just help me..... demo: http://tryitnow.net16.net/
Html:
<a id="login" href="javascript:void(0);"> Login </a>
Css:
.User-Login {
visibility:hidden;
position:absolute;
left:1150px;
top:90px;
background:black;
-webkit-transition: height 1s ease;
transition: height 1s ease;
overflow:hidden;
height:10px;
}
.box-change {
height: 250px;
}
.box-colap {
height:10px;
}
jQuery:
$(function () {
$("#login").click(function () {
var visi = $(".User-Login").css('visibility');
if (visi == "visible") {
$(".User-Login").toggleClass("box-colap");
setTimeout(function () {
$(".User-Login").css('visibility', 'hidden');
}, 2000);
} else {
$(".User-Login").css('visibility', 'visible');
$(".User-Login").toggleClass("box-change");
}
});
});