Chris Coyier
Founder, writer, designer, spam-deleter, email personality
Cufon 101
1. Include the JavaScript for Cufón and the Cufón font
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/TitilliumMaps.font.js"></script>
2. HTML
Normal tags
<h1>Business Solutions</h1>
<h2>Business Insurance</h2>
3. Tell Cufón to replace the fonts for the specified CSS selectors
<script type="text/javascript">
Cufon.replace('h1, h2',
… Organic Tabs
Have you ever seen a tabbed content area in a sidebar that was a little “jerky”? The jerkiness can be caused by a bunch of things, like the content in the tabbed areas are of different heights, or maybe the …
Table Row and Column Highlighting
Cross Domain GET Forwarding
When you do an AJAX request on a website, the URL you request from needs to reside on the same domain as where the request was made from. This is a security restriction imposed by the browser. There is a …
May is Maintenance Month
There are over 600 blog posts on this site over the course of nearly 3 years. Some of them are… better than others. I think it is the responsible thing to do is try to keep that content current and …
Fallback for CDN hosted jQuery
Several big companies offer copies of jQuery hosted on their CDN’s (Content Delivery Network). Most notoriously Google, but also Microsoft and jQuery themselves. A lot of people swear by this since it saves bandwidth, downloads faster, and perhaps even stays …
jQuery UI’s Position Function (plus, MagicZoom from scratch)
Knowing how to position things where you want them is one of the most important tools in a web designer’s toolbox. Understanding page flow, understanding everything is a box, understanding floats, etc. Once the basics are learned, a common …
My Stuff from jQuery Conference
The Bay Area jQuery Conference was amazingly fun. I met TONS of great people who I’ve wanted to meet forever. It was kinda like a Bluegrass Festival in some ways. The sessions weren’t recorded so unfortunately you can’t check them …
iPad Detection
Of course, the iPad is a pretty large screen and a fully capable browser, so most websites don’t need to have iPad specific versions of them. But if you need to, you can detect for it with .htaccess
RewriteCond %{HTTP_USER_AGENT}
… Facebook “Like” Button for WordPress
Some very easy copy-and-paste code here to add to the template for blog posts to allow for Facebook “liking” of the article. Probably best in the single.php template underneath where it outputs the content of the post.
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo
…