Adding custom animation function fadeIn() || fadeOut()?

Good evening . Arose a question :
For the test job has been said to implement the animation of the disappearance and the appearance of the element using jquery functions fadein and fadeout ,but the animation should not be the default colors(just change opacity to zero) , and the emergence of left-to-right and disappearance of right-to-left(screenshot below) 5dfa833e7de58708139956.jpeg
Maybe there will be those who implemented a similar task and willing to help with advice .
Thanks in advance.
April 3rd 20 at 18:36
1 answer
April 3rd 20 at 18:38
This is not to fadeIn and fadeOut should be treated.
These functions work with opacity.
Wrap the button in a block, let him have it in the Css width: 0;
and in Js write this:
the name of the button.toggleClass(class name);

In Css:
.class name {
width: 100%;

Find more questions by tags JavaScriptjQuery