October 2011
1 post
Using HTML Attributes in Generated Content
Generated content using CSS (i.e.: inserting a colon after each label element) can be a great way to ensure that content appears no matter what has been put in the container. However, when dealing with certain types of content and internationalization, this approach is quickly scrapped for a server-side insertion of the content. There may also be cases when you want to access and modify the...
April 2011
2 posts
4 tags
jQuery RememberState Version 1.1 Released
After seeing a fair amount of traffic on my previous post for my jQuery localStorage plugin I figured I should update it to make it a little easier to use. The rememberState plugin now has options for the localStorage object name, clearing the storage on submit, the ability to send a custom notice block, and a notice selector in the event the notice element already exists in the form. For more...
1 tag
Making CSS Content Properties Dynamic
One of the obvious issues with text content added to the page via CSS is that it is content stored in the visual presentation layer rather than the content (HTML) layer of the document. Because of this, whenever you need to update this content, you need to change the value of the content property in the CSS file. This is even more of an issue when thinking about internationalization and having to...
February 2011
2 posts
2 tags
A Sass Mixin for Cross-Browser CSS Background...
Yesterday at work, I was referencing the Mozilla article on gradients and noticed a link to Microsoft’s developer docs, mentioning there was a way to do linear gradients with IE as well. I was a bit excited to think that I would no longer have to look at our client projects in IE and think how plain they look. At Hashrocket, we code CSS with graceful degradation in mind. Generally, that...
3 tags
Pure CSS Isometric Bar Chart
Earlier this week, I was given a design to cut up that included an isometric bar chart (or is it graph?). When the design was in process, one of our developers saw it and thought it wouldn’t be possible in CSS alone like the other charts we have done for the same project. Myself and Cameron, one of Hashrocket’s designers, took that as a challenge and came up with a way to create it. As...
November 2010
2 posts
3 tags
Saving Form State with jQuery and localStorage
Recently I was working on a project that had a lot of forms each with a large number of inputs, and I was thinking how frustrated a user must feel when they’ve filled out some of a form and for whatever reason they lose that filled in data. Maybe they accidentally clicked a link in the sidebar, or closed the tab, or Firefox died for the twentieth time that day. Whatever the reason, the user...
4 tags
When You Should Use jQuery's Live and Delegate...
Recently, I was working on a project at Hashrocket that involved many different types of elements being introduced into the DOM after it was loaded, and most of those elements needed Javascript events to be attached to them when they were written. Since the release of jQuery version 1.3, everyone has heard of and used the .live() method for attaching these elements whenever possible. Live works...