Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

is it good practice

hey is it good practice to make image slider like this http://codepen.io/mehra_as/pen/zrpdry or should i opt complicated code to make it..

1 Answer

Steven Parker
Steven Parker
231,008 Points

I think when you get into stylistic design concerns like this, it's beyond any general "good practice" recommendations. It's designer (or client) choice, with perhaps some attention to creating a consistent site-wide "look and feel".

However, one specific comment on the code: I didn't see any use of opacity, so this transition seems wasted:

   transition :opacity 1.5s linear;

But, if you were to change it so it transitions the margin instead:

   transition: margin 1.5s linear;

...you get a smooth slide effect as the different photos are selected.