Using .slideToggle to pull a hidden div up from the bottom

陌路散爱 提交于 2019-12-03 20:54:31

Just add position:absolute; to #clientsDropDown.

jsFiddle example

Or if you want "clients" to sit on top of the popup div, remove the float and position the paragraph above the dashboard div like in this jsFiddle example.

Try changing your script to:

$("#clientsOpen").click(function(){
    $("#clientsDashboard").slideToggle();
}, function(){
    $("#clientsDashboard").slideToggle();
});

Yes and of course position the container div to absolute.

The actual property that is changing the direction of the reveal animation is the bottom CSS property. If it were changed to top the animation would reveal down rather than up.

Try it for #clientsDropDown in the previous fiddle provided and you will see it in action.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!