Cloning a JavaScript Object Using jQuery

I was recently using Keith Wood’s calendar plugin and kept running into an issue when trying to copy a date object and add days to it. When I would copy the object, I was actually just creating a reference to the original… Not what I wanted.

Found the answer was to clone the object, and John Resig had the answer via jQuery’s $.extend() method. It’s awesome when your fav lib has the method you need so writing one from scratch isn’t necessary. Check it out: Continue reading “Cloning a JavaScript Object Using jQuery”

A New Way to Serve IE6 CSS

This morning I had the opportunity to rethink how I handle IE6 support.

I’ve been torn, in the last few months, over how to phase out support for IE6 at my design firm. I’ve always had a one version back policy with my clients when it comes to Internet Explorer. Now that IE8 has been released I should be phasing out our support for IE6. But version 6 has enjoyed a massive deployment in corporate environments that has been made painfully clear to me by my past work with AT&T, Time Warner and other large corporate IT organizations.

How can I turn a blind eye on a still significant portion of my client’s viewer-ship and still help push the general Internet populace toward modernity? The answer, very probably, has been presented by Andy Clarke (@beautifulweb ) at For A Beautiful Web .

Andy has proposed the use of an Universal IE6 style sheet. Think of it as a glorified reset style sheet. The IE6 Universal Style Sheet incorporates Eric Meyers’ reset as well as basic layout and typography styles. The goal is not to reproduce your rich design in IE6 through hacks, but to present your semantic content in a consistent manor focused on great typography and page cadence.

Why does this work for me? Because it allows me to save time, hence expense, when developing content rich sites. No longer do I need to spend hours trying to hack together CSS to compensate for IE6’s inadequacies. I can circumvent the whole issue by presenting content only. I sell this to my clients as the cleanest, fastest, most cost effective way to serve their visitors stuck with IE6. Consider this, I can spend two hours of my time hacking for IE6 support, or just a few minutes to link to an Universal IE6 Style Sheet. That’s a savings of several hundred dollars for my client.

The end user receives a nicely formated page that is light and to the point, and not broken! And if I really want to get the point across, I can use JavaScript to present a friendly message to IE6 users, such as:

“Page auto-formated for Internet Explorer 6. Upgrade your browser for a richer experience. Please Upgrade IE or you can get FireFox or Chrome.”

Check out this example from Andy Clarke’s website. The gallery below shows his site in FireFox and IE6.