erichynds

Welcome to my online development portfolio and blog. I'm Eric Hynds, a 23 year old website developer living outside of Boston, Massachusetts, and I'm passionate about developing functional, standard-compliant, and user-friendly websites.

Archive for February, 2010

FamFamFam Silk Icon Set in Base64 Encoding

Wednesday, February 24th, 2010

This one can be filed under both “total impractical” and “somewhat useful”. For those who haven’t heard of this trick before, base64 encoding enables you to embed binary image data directly into your HTML or CSS source. Therefore, instead of the browser requesting two files from the server – the CSS file and the image file – only the CSS file need be requested. There are a number of drawbacks/pros/cons to this approach: IE doesn’t support it, file size limitations, larger CSS files, inability to separately cache CSS vs. images, etc. etc., but if you feel the need to use FamFamFam Silk icon’s in base64, look no further.

I use icons very liberally on all my projects; they’re classy and aid in usability. I typically start with a “.icon” class that configures the correct padding/background details for the element, followed by a “.icon-*” class, which sets the background-image property to that of the desired icon. For example, this CSS:

.icon { background-position:left; background-repeat:no-repeat; padding:3px 0 3px 19px }
.icon-pdf { background-image: url(/images/icons/pdf.png) }

Applied to this anchor element:

<a href="#" class="icon icon-pdf">Download PDF</a>

Produces:  Download PDF

Can you dig it? (more…)

jQuery MultiSelect Plugin w/ ThemeRoller Support

Monday, February 1st, 2010
07-09-2010 – This plugin has been re-written!

I’ve re-written this plugin using the jQuery UI widget factory. As such, a number of new features have been added, bugs fixed, and performance issues addressed. While this version will still be supported, I highly recommend you use this new version instead!

I’ve been working on a multiple select plugin on and off for the past couple months and finally have it stable enough for a first release. When I started this project my intentions were only to re-factor Cory LaViska’s MultiSelect implementation, but it quickly turned into a complete re-write with a focus on speed and ThemeRoller support. This plugin turns an ordinary HTML select control into an elegant drop down list of checkboxes.
jQuery MultiSelect

Features

  • Full ThemeRoller support.
  • Optgroup support with clickable labels.
  • Optional header with check all / uncheck all / close links.
  • Degrades gracefully.
  • Keyboard support.
  • Ability to hook into 5 different event callbacks.
  • Display the checked options in a list with a configurable maximum.
  • Easily change the position, fade speed, scroll container height, links text, and input text.
  • The widget width inherits from the original element, but is also configurable as a parameter.
  • Pre-selected & disabled option/widget support.
  • bgiframe support.
  • Only 6.9kb minified (2kb Gzipped).

(more…)