开发者

jQuery slideToggle() on two items concurrently

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?


Call the slideToggle function on both objects one after the other. The transition will happen concurrently.

$("#obj1").slideToggle();
$("#obj2").slideToggle();


You can create a new element for the new text, position it over the old element, then slideToggle() both of them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜