+ 5

[jQuery] If slideToggle() animates to slide down/up. What's the animation code to slide sidewards?

What's the code for the side menu to slide sidewards?

14th Jul 2018, 6:04 AM
Email Not Activated
4 Answers
+ 6
That's not what I meant but nevermind, I'll get rid of it.
14th Jul 2018, 6:53 AM
Email Not Activated
+ 4
Janning⭐ Already tried that, sorry I forgot to include that O already tried some animation sidewards. But that animation when it's closed, the texts inside messed up as it comes narrow slowly. Just like this code: https://code.sololearn.com/Wm641zRJdSs9/?ref=app
14th Jul 2018, 6:16 AM
Email Not Activated
+ 1
You can try: https://stackoverflow.com/questions/17271169/slidetoggle-jquery-right-to-left But keep in mind the caveats they list.
14th Jul 2018, 6:12 AM
Janning⭐
Janning⭐ - avatar
0
Hi Golden Rockstar, Thanks for posting your code. I didn't realize that you wanted specifically to use animate instead of toggle, so I'm not really sure what you mean when you say "Already tried that," but it also looks like your end goal was probably a menu or navigation pane that slides out of the way like a tray. If that's still the case, I'm not sure why the solution in the article wouldn't work for you. I tested it in SoloLearn and it seems to work fine: https://code.sololearn.com/W5A67UWUyJ6f/?ref=app There are also ways of achieving this with just CSS, but your question was specifically for jQuery, so I didn't provide those references.
14th Jul 2018, 6:48 AM
Janning⭐
Janning⭐ - avatar