Rich-Harris / ramjet

Morph DOM elements from one state to another with smooth animations and transitions
http://www.rich-harris.co.uk/ramjet/
MIT License
5.45k stars 158 forks source link

Docs need improvement [suggestion] #39

Open falafflepotatoe opened 9 years ago

falafflepotatoe commented 9 years ago

Small rant sorry...

You should mention somewhere that elements have to be hidden first then do ramjet.transform(), and use { done: => { ramjet.show(target) }}... and also maybe that it doesnt like jquery elements.

If the docs do say that, my apologies, I couldn't find it

Reason is all your demos use hidden elements, but its not clear how to interact with a hidden element, and the effect doesnt work at all with hidden elements..

I originally tried to setup a fiddle with jquery and ramjet and it didnt work at all, then I tried to use a hidden element as a target transition and it didnt work, so I tried all the variations of methods to hide an element, display:none, visibility:hidden, jquery hide, etc.

anyway after 30 minutes i got this: https://jsfiddle.net/davwcwmr/ cool!

humanismusic commented 8 years ago

Yes, that would be very helpful as spent a similar amount of time figuring this out. Thanks for the jsfiddle.