I have this jQuery code:
var help;
$('.helpPin').click(function(){
if(help == true){
var cssObj = {
'position' : 'absolute',
'bottom' : '0'
};
$('#help').css(cssObj);
help = false;
} else {
var cssObj = {
'position' : 'absolute',
'bottom' : '-206px'
};
$('#help').css(cssObj);
help = true;
}
});
That basically just swaps css for an element, how can i introduce animate effects to so its not too jerky? Can you use .css inside .animate?
toggleClasswould be better.toggleClass.