You can use jquery ui slide :
$("#calender").hide("slide", { direction: "left" }, 1000);
Or, if you do not want to include the JQuery UI, I would suggest doing something like this:
HTML
<div id="calendar-wrapper"> <div id="calendar"></div> </div>
CSS
calendar-wrapper { overflow:hidden; position:relative; } calendar { position:absolute; width:100px; height:100px; top:0; left:-100px; }
js (jquery)
//to show $("#calender").animate({"left":"0px"}, 1000); //to hide $("#calender").animate({"left":"-" + $("#calender").width() + "px"}, 1000);
You can also use classes instead of specifying a left position in js and then animate this.
I also saw people living {"width": "toggle"}, but I find it laggy. try it if you want.
As you can see, there are many solutions for what you need. good luck !!
source share