How can I have a div go from collapsed to expanded (and vice versa), but do so from right to left?
Most everything I see out there is always left to right.
Answer: Use the jQuery animate() method There are no such method in jQuery like slideLeft() and slideRight() similar to slideUp() and slideDown() , but you can simulate these effects using the jQuery animate() method.
We can smoothly move any element using jQuery . animate() method, the method basically changes value of css property of the element gradually to perform animation effect, the example shows how easily we can move DIV box to left, right, up and down with . animate() method.
$("#slide").animate({width:'toggle'},350);
Reference: https://api.jquery.com/animate/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With