Isn’t There a Better Way?

I am convinced the answer to that question is almost always “YES”! (Although you don’t have to yell it or use all caps like I do.)

I was working on a fluid layout website and the client wanted some changes made to the main slide show. I ended up switching the original slideshow for a more robust plugin and to my disappointment the new slideshow was not fluid.

My first instinct was to write a script that would check the width of the container on re-size and then apply it to the slideshow. That could be an unnecessarily heavy solution to a layout problem however. I checked on the jQuery forum for the plugin and saw that several people had my same idea. Some even wrote some hacks that were pretty lean compared with with I came up with.

Then lightening struck and I discovered a comment at the bottom of the thread pointing out some not-so-well-known settings that come built-in to the plugin that allow for the container to be fluid.

Hallelujah! No hacks tonight boyee!

This got me thinking of how it pays off to not settle for the first solution that comes along. There’s always a better way. Can you imagine what the world would be like it Edison had successfully convinced us that Direct Current is the end-all of power sources? Get out of my face Edison! Tesla came up with a better way so go dig your own ditches.

Nikola Tesla

Nikola Tesla - Father of Alternating Current... and pretty much everything else

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>