Reputation: 8397
So I'm in the process of creating a text slider, for headlines. I would like the currently displayed text to side out, at the same time that the new text is sliding in. Is there a way that I can use jQuerys .slideToggle()
or .slide()
concurrently to be able to do what I want?
Upvotes: 1
Views: 287
Reputation: 729
Call the slideToggle function on both objects one after the other. The transition will happen concurrently.
$("#obj1").slideToggle();
$("#obj2").slideToggle();
Upvotes: 3
Reputation: 887453
You can create a new element for the new text, position it over the old element, then slideToggle()
both of them.
Upvotes: 0