I have a problem with this jquery script.
toggle:function()
{
if(this.opened){
$("slideToBuyBottomBtnClosed").setStyle("display","block");
$("slideToBuyBottomBtnOpen").setStyle("display","none");
$("sildeToBuyContent").setStyle("overflow","hidden");
this.openOrCloseEffect.start({height:0});
this.opened=false
}else{
$("slideToBuyBottomBtnClosed").setStyle("display","none");
$("slideToBuyBottomBtnOpen").setStyle("display","block");
setTimeout($("sildeToBuyContent").setStyle("overflow","visible"), 1000);
this.openOrCloseEffect.start({height:182});
this.opened=true
}
}
I'm fighting with the setTimeout
- I need to have this line:
$("sildeToBuyContent").setStyle("overflow","visible");
started with a 1 second delay but I don't know if setTimeout
is the right way.