madrobby / zepto

Zepto.js is a minimalist JavaScript library for modern browsers, with a jQuery-compatible API
http://zeptojs.com
Other
15k stars 3.91k forks source link

No slideUp / slideDown functions? #1079

Closed andreszs closed 9 years ago

andreszs commented 9 years ago

Classes manipulation and smooth toggling ob objects with the slideUp / slideDown functions is very essential these days. I was very disappointed to see this library is 25 KB in size, and the very first function I tried returns undefined.

I rather not switch to jQuery and its 92 KB just for using essential sliding functions, is there some way to add these functions into Zepto easily? Thanks.

mislav commented 9 years ago

Hi, we offer the optional fx_methods.js module which is excluded by default but you can make your zepto.js build with it. However, it doesn't provide the slideUp/Down fuctions. We encourage you to implement those animations with CSS transitions and trigger them with classname switching in your webapp.

Or, if someone stepped in and implemented these functions in fx_methods.js, we would gladly review the submission. Thanks!

emkayy commented 7 years ago

Unfortunately slideUp / slideDown ist not possible to do with CSS transitions, since you can't animate to height: auto. Therefore I'd appreciate these methods in native Zepto as well!

Also the setting to display: none in the end, respectively restoring display is quite important in many cases, which you can't do in css only.