Archive for January, 2008

Next Entries »

Unobtrusive, cross-browser method to add icons to links

There are lots of examples of using CSS to add filetype icons to links, but they all rely on advanced CSS selectors, which Internet Explorer 6 doesn’t support.
If you’re looking for a cross-browser method of adding filetype icons to links, you have a couple of choices: you can add a class name to all [...]

Salivating over server-side Javascript

I came across The End of Web Frameworks in my dzone RSS feed this morning, and it echoes a thought that runs through my brain as I get more and more comfortable with jQuery: who needs the server when you’ve got Javascript? Wouldn’t it be great if the server just handed out data, and the [...]

Suspicious StumbleUpon Bounce Rates?

I’ve been promoting some of my blog posts by submitting them to StumbleUpon, and it’s been generating a fair bit of traffic — my post “How I Learned CSS” has done especially well. I’ve been watching my site using Google Analytics, and I’ve noticed that visitors from StumbleUpon have a substantially lower bounce rate than, [...]

Fixing width issues with IE6 print stylesheets

Note to self: remember to use !important when trying to deal with text running off the page in print versions of pages in IE6.
Basic steps to follow:

EITHER have separate print and screen stylesheets …
 
<link rel="stylesheet" media="screen" type="text/css" href="styles.css" />
<link rel="stylesheet" media="print" type="text/css" href="print.css" />
 

… OR declare separate screen and print rule sets in a [...]

Update page using JSON data

updateWithJSON is a jQuery plugin that updates elements on your page based on key/value pairs in a JSON object. Usage:
$.updateWithJSON(jsonData)
Here’s a demo, and here’s how it works:

iterate over each property/value combination in the JSON object
look for an element in the DOM that matches the property name

first, look for an element with a matching id attribute
if [...]

Next Entries »