Archive for December, 2007

« Previous Entries Next Entries »

jQuery: Build table from JSON data

Given data like:

var data = {
“GUEST” : {
“visits” : 1734070,
“visits_pct” : 74,
“users” : 1,
“net_pv” : 3432781,
“users_pct” : 0,
[...]

jQuery: Randomly reorder children elements of selected elements

I’m working on a new template for a client, and they asked me to display some list elements in a random order on each page load. I did my Google due diligence, but didn’t come up with anything that wasn’t slideshow-like — what I wanted was just something that would show all of the children [...]

In case you thought IE6 was going away

Microsoft has released yet another version (the third, I think) of their timebombed XP/IE6 image for use with their Virtual PC Console. (Why they keep timebombing it is a mystery to me — it’s as if they think one of these days, approximately six months from whenever they release a new version, there won’t be [...]

Command line goodness

Two good ones from today:
cygwin/perl: change all references to portfolio.html to portfolio_d.html.
perl -i -p -e ’s/portfolio\.html/portfolio_d.html/g’ *.html
More perl command line goodness here.
vim: on every line that has an element with an id attribute, take the value of that attribute and use it as the argument for a php command.
g/id="\([^"]\+\)"/ s/id="\([^"]\+\)"/value="<?php $io->p(’\1′); ?>" id="\1"/
More on [...]

Insert jQuery into any page using a bookmarklet

Ever wish you could use jQuery on a page at the drop of a hat, without having access to the page itself? Well I’ll be damned, you can.
(This is one of those things that in hindsight seems so painfully obvious that I’m almost embarrassed to admit that it never occurred to me, but admit it [...]

For only $25 more, this gift card comes in green

I was just at the online Apple store to buy an iTunes gift card for my mother (who hopefully will not be reading this blog) — when you arrive from iTunes, it drops you on a page where you can choose from a variety of gift card designs. On this screen, it seems that there [...]

Using ems for font sizing in css

A List Apart had a great article recently on using ‘em’ for CSS font-size declarations, which served as great back-up for some conversations I’d been having among coworkers. (It turns out that people who didn’t have a former life in print don’t necessarily understand what an em is: a self-referential unit of font size measurement, [...]

DateJS

Forgot about coming across DateJS in one of my feeds the other day. Haven’t used it yet, but expect I will next time I have to do much of anything with user date input. I’ll be especially happy if it does end up getting integrated with the jQuery UI datepicker ….

More on jQuery selectors

Following up on my 13 seconds of selection hell:
jQuery: what are the fastest selectors?
Turns out that, as you might expect, $(’div.class’) is faster than $(’.class’), and so is $(’div’).filter(’.class’). Knowing where not to look (”skip anything that’s not a div”) helps make jQuery faster. To which you might say, “well duh.” Regardless, the post above [...]

Spreading jQuery

I just came across this post in my Google Blog Search jQuery feed. It’s a quick story of how a developer convinced a corporation to use jQuery for an application, and it caught my eye because I was in a similar boat a few months ago.
A colleague had come up with a concept for [...]

« Previous Entries Next Entries »