When a little JavaScript is too much

August 30, 2007 at 8:31 am | Posted in Assignments, HTML, Programming | Leave a comment

Create a Lightbox effect only with CSS – no javascript needed at Emanuele Feronato provides a simple solution to create a basic light box using predominately CSS. The promise of liberating the conundrum of presenting images, often photographs, within the virtual space of a webpage using simple techniques drew a large amount of interest (myself included) and feedback.

That the title promises no JavaScript, but the substance of the solution relies upon it, drew ire from most commentators. Some provided constructive feedback, others provided their own solutions, and still others were quick to point out which particular browser failed to display correctly.

There are tons of Lightbox scripts in the web, each one with its unique features and limitations, but all require massive use of Javascript or the installation of javascript frameworks.

Which captures the current problem. JavaScript creates a perception of complexity, of insistent pop-ups, of browser incompatibilities, of bloat. People who desire to create virtual light boxes want implementations they can use without needing Computer Science degrees.

JavaScript predates CSS. Current CSS progress extends CSS with modifiers such :active and :focus. These improvements allow CSS to supplant and remediate JavaScript with similar functionality. This follows current programming design to favor abstract descriptions in favor of explicit control. While the light box may be a case of There is More Than One Way To Do It (TMTOWTDI), in the end very few of the comments eschewed the solution for avoiding JavaScript, but rather using too much JavaScript.


Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: