jQuery Plugin: Chosen
I often come across unwieldy select elements, and it’d be awesome if every site used Chosen to make them more usable. In fact, I should probably look into using GreaseMonkey to make Chosen ubiquitous for me.
I often come across unwieldy select elements, and it’d be awesome if every site used Chosen to make them more usable. In fact, I should probably look into using GreaseMonkey to make Chosen ubiquitous for me.
I’ve been a big fan of jQuery more or less since it came out, and I’m happy to see the launch of The jQuery Project. I’ve used jQueryUI a couple of times and find it fairly useful; I haven’t tried Sizzle yet but it looks great for situations where you’re really concerned about keeping file sizes low but need decent CSS selector support; and I wish QUnit had been around when I was writing a lot of client-side code.
“JavaScript Programming Patterns”, by Klaus Komenda, is an excellent walkthrough of several JS patterns. If you code JavaScript regularly you probably know at least some of these but will likely still find something useful in it—I particularly like the lazy function definition, a pattern originated by Peter Michaux:
var foo = function() {
var t = new Date();
foo = function() {
return t;
};
return foo();
};
Simple, elegant, solves the problem of making sure that the heavy lifting only gets done once.
A couple of years ago I plugged star-light, a syntax highlighter that’s entirely client-side. I’ve been happy with it, but wanted a Python mode for it. I was going to post some other code this evening, and then decided that I should just make the Python mode myself.
This led to fun with regular expressions.
[more...]
I really like this jQuery sparklines plugin. I’m not sure what uses I can find for it right now, but my books/week or books/month reading rate, something like lines of code written or changed per day, the page counts of recent books, or recent MTG results would all work with it. Some of those things would be better expressed with full-size graphs using Flot, though. But while I don’t have a use case right now, this seems like a tool worth having in the toolbox (especially since it’s free).
Recently I’ve been noticing once again how useful jQuery is, and wondering how I ever did DOM manipulation without it. It’s been a while since I’ve really looked at the release notes, but the latest version (1.2.6) has some significant improvements in it.
[more...]
While working on the tournament runner application that’s part of the ongoing rewrite of sfmagic.org, I encountered a problem which I think is indicative of how important ways of viewing problems are for coming up with solutions, especially in programming.
[more...]
Date handling in JavaScript sucks. It’s quite astonishingly bad, in fact, and I always think that I’m forgetting to do something when I try to use it—but no, it appears that the major JavaScript developers have never pushed a robust date object. I’m not sure why, as the Web’s international nature seems to make that more important, not less. On top of which the browser should really tell the server what time zone it thinks it’s in, but that’s another story. Anyway, there’s a library I’ve been looking at, and which we’re apparently going to use at work, Datejs (available at datejs.com).
[more...]
I already have a buch of plans for larger projects, including finishing the sfmagic.org rewrite, but I think it makes sense to have some smaller projects to work on as well, things that I can switch to and make significant progress on in a relatively short amount of time.
[more...]
Individual draft groups in MTG are called “pods”. The sfmagic group runs drafts every Wednesday (19:30, Milano’s Pizzeria), and it’s these drafts that I’m rewriting a site to track the results of. At the moment I’m writing the data entry side, and took a slight detour to write a utility to help in the weekly organization.
[more...]
Sadly, I’m not quite going to finish a drop-in replacement for the current sfmagic.org codebase by my deadline of tomorrow. I’m close, and I think I have everything except the data entry portion, which I’ll lay out in this post.
[more...]
I didn’t have much time to work on the rewrite today, and spent what time I did have messing around with graphs.
[more...]
Today I told Nimblefish I was leaving. My last day is 4 May, Friday after next.
It’s rather weird to be leaving. I’ve been there for almost five years.
[more...]
AJAX has a significant limitation: for security reasons, it can’t fetch data from sites other than the one the user is on. This makes a number of cool things much harder to do.
One way around this is the script tag hack. But that requires a third party that outputs JavaScript files, whereas what I want is to be able to process XML and/or HTML from that third party.
[more...]
position:fixed SupportThe CSS fixed value for the position property is extremely useful, particularly in allowing for persistent navigation on long pages. Naturally, versions of IE before 7 don’t support it. I’ve been getting around that using JavaScript.
[more...]
When you’re manipulating the DOM and are working with elements through list or array iterators, it’s important to remember that the arrays/lists are “live”—otherwise you’ll end up spending a lot of time trying to figure out why your code is, for example, skipping nodes.
[more...]
These are the tools I use when doing web development.
[more...]
I’ve had a heavy JavaScript workload for a while, and these are some thoughts/observations.
[more...]
I’ve recently been writing documentation at work, and have been writing it in HTML, which is more or less my native format for that kind of writing. In doing so, I’ve been focusing more on document structure and how it aids usability for the reader. Over the last couple of weeks I’ve also started to focus on how it might improve usability for the author.
[more...]
Years back I wrote some online tutorials on how to animate circular movement in Lingo and JavaScript. While moving my older articles to this site, I realized that I could not in good conscience move this one without updating it. So, a tutorial on circular animation in JavaScript follows.
[more...]
After collaborating with me on an AJAX enhancement to our web application, my co-worker Ryan today asked me to give our engineering group an introduction to AJAX techniques. That seems like an interesting idea, so I’m going to sketch out the kind of thing such an introduction might cover.
[more...]
I made a Greasemonkey script that shows you more cars per reservation page than the measly 5 that Zipcar gives you.
[more...]
I’m on a big Greasemonkey kick at the moment, and have decided that I’m going to make a small project of improving Zipcar‘s user interface.
[more...]