lampShade
lampShade

Reputation: 4391

jQuery image sliders and their images

I'm new to jQuery and image sliders. Is it best practice to make the images that I want to slide the same size as the slider container that holds them?

Upvotes: 1

Views: 158

Answers (2)

Roko C. Buljan
Roko C. Buljan

Reputation: 205987

It's not about best practice, it depends on your needs,
but creating a slider (novice) in javascript/jQuery it's most easier to have it same width,

  • you can much easily control the sliding parent position...
  • you don't need to do CSS trickery to maintain your images centered...
  • you don't need to do javascript calculations about the sliding space left...
  • one day you can replace your images with DIV elements that will hold more data...

example gallery

Upvotes: 0

ŁukaszBachman
ŁukaszBachman

Reputation: 33735

@Roko already explained everything you need to know. On my behalf, I just want to share with you this link: Learn jQuery in 30 days. This course helped me a lot with mastering jQuery and it contains an example of slider with guide by great jQuery ninja - Jeffrey Way. I strongly recommend you to look at it and surely this time will not be wasted. Have fun!

Upvotes: 1

Related Questions