I have a function to show and hide a utility bar on a page. I want to animate it. It's not animating. The class "flag" is empty. The "min" class simply changes the background image and the height and absolute positions of the utility bar.
What am I doing wrong?
$(document).ready(function() {
var ubar = $("#ccUtilityBarWrapper,#ccUtilityBarWrapperInner,#clickBar");
ubar.delay(10000).queue(function(nxt) {
if ($(this).hasClass("flag")) {
}
else {
$(this).addClass("min",1500,"easeInOutQuad");
nxt();
}
});
$("#clickBar").click(function(e){
ubar.addClass("flag");
ubar.toggleClass("min",1500,"easeInOutQuad");
});
});
#ccUtilityBarWrapper {
position: fixed;
z-index: 3;
bottom: 0;
left: 0;
width: 100%;
height: 48px;
background: #1775b5;
-webkit-box-shadow:0px 0px 3px rgba(0, 0, 0, 0.75);
-moz-box-shadow:0px 0px 3px rgba(0, 0, 0, 0.75);
box-shadow:0px 0px 3px rgba(0, 0, 0, 0.75);
}
#ccUtilityBarWrapper.min {
bottom: -48px;
}
/* used to place utility nav in absolute position */
#ccUtilityBarWrapperInner {
background: none;
position: fixed;
z-index: 4;
bottom: 0;
width: 100%;
height: 81px;
}
#ccUtilityBarWrapperInner.min {
background: none;
height: 40px;
}
#clickBar {
background: url("http://teamsite-prod.rccl.com:8030/animated_bar/minimize.png") no-repeat scroll center top transparent;
height: 34px;
}
#clickBar.min {
background: url("http://teamsite-prod.rccl.com:8030/animated_bar/expand.png") no-repeat scroll center top transparent;
height: 40px;
}