animate.css icon indicating copy to clipboard operation
animate.css copied to clipboard

SlideIn/OutRight

Open rfossella opened this issue 11 years ago • 1 comments

I have a question about sliding an element in-to and off-of page.
I have an element that is initially hidden - i.e. <div id="myDiv" class="well" style="visibility: hidden; position: fixed; z-index: 999; right: 0;">

When I attempt to use $("#myDiv").addClass("animated slideInRight") it does not display; conversely, starting element as visible and using $("#myDiv").addClass("animated slideOutRight") does the slide-right (off-of-page) animation but then pops the element back into view.

Using straight-up jQuery - e.g. $('#myDiv').toggle('slide', {direction: 'right'}, 1000); will certainly handle the visibility aspects of the element.

So, my question is, do I have to "manually" manage the visibility for actions that semantically indicate that they will be moved OFF/OUT of page? If it is manual. are there timing concerns? Lastly, is there an equivalent of TOGGLE?

Thanks. Rob

rfossella avatar May 23 '15 07:05 rfossella

@rfossella yes you need to hide the element on animation completion. If you notice on the demo page once the slide out happens the element reappears at its original location

poseidonsw avatar Jun 03 '15 15:06 poseidonsw