eylay
eylay

Reputation: 2168

Change position of other photos by SlideDown & SlideUp in JQuery

I use JQuery slideDown & slideUp to make a slide show:

$(".arrow-right").click(function(){
  $("img.book1").slideUp(500);
  $("img.book2").slideDown(800);
});

$(".arrow-left").click(function(){
  $("img.book2").slideUp(500);
  $("img.book1").slideDown(800);
});

And in this fiddle you can see that it effects on the other photos. (In the fiddle you see that the issue is the wooden shelf moving up & down)
I have tried so many things but I couldn't solve this issue.

Upvotes: 2

Views: 36

Answers (1)

Praveen Kumar Purushothaman
Praveen Kumar Purushothaman

Reputation: 167212

You can think of fixing the height. Or may be in best, using min-height:

ul li:first-child {
  display: inline-block;
  min-height: 145px;
}

Upvotes: 3

Related Questions