Cris
Cris

Reputation: 4044

jQuery Plugin - DIV boxes changer/fader?

Could you help me out with a link or two to a plugin that automatically fades through different div boxes. Here's my HTML:

<div class="box">
    <img src="test1.jpg" />
    <p>text1</p>
</div>

<div class="box">
    <img src="test2.jpg" />
    <p>text2</p>
</div>

<div class="box">
    <img src="test3.jpg" />
    <p>text3</p>
</div>

Thank you. All input appreciated.

Upvotes: 0

Views: 326

Answers (2)

mattsven
mattsven

Reputation: 23283

You wish to fade them in in order?

$(".box:first").fadeIn("fast", f=function(){
    if($(this).next(".box").length != 0) $(this).next(".box").fadeIn("fast", f);
});

EDIT

Make sure the boxes are hidden by default:

CSS: .box { display: none; } or jQuery: $(".box").hide().

Upvotes: 1

Related Questions