javascript

Firebug Inches Along

Tom's picture
Tags: 

It's been too busy around these parts for me to put together a post about the exciting things happening in the DC tech community, particularly in the hobbyist electronics space (short version: they're exciting!). But I can at least share this tip.

Many of you are probably using the newly-released Firefox 3 release candidate, and it seems likely that some of you are running into the same problems with Firebug that I was, particularly when using its Javascript console. Big, angry errors with "NS" and "SECURITY" in them? Yup, that's the one.

Well, get thee over to the firebug downloads page and grab the latest alpha. It solves this problem, but introduces a new one for those debugging a jQuery-enabled page: the jQuery object is nowhere to be found.

Actually, it's not that bad: you just need to do something like this

$ = window.$;

Before you start mucking around with scripting from the console. It's irritating, but I'm sure it'll be fixed soon. And in the meantime, you could always whip up a Greasemonkey script to do this job automatically.

When It Just Needs to Look like a Rollover

Meaghan's picture
Tags: 

Hello, World.

That seems appropriate as an opener for my first post on Labs. Usually I find myself on the less-technical, more client-management focused side of things here at EchoDitto, but I was encouraged to join the discussion here, so here I am!

So I was tasked yesterday with adding a graphic button to a client’s site and they wanted the image to change when you mouse over it. A rollover image. Simple enough. Except that I didn’t want to use Javascript. It would have been possible, sure, but I would have had to snag one of my friends on the tech team and it would have been a hassle. So I wanted to see if I could make it work without Javascript.

Luckily, the rollover image the client wanted to use simply involved changing the color of a particular part of the original image. In a flash of resourcefulness, I thought: CSS can do that! Five minutes later, I had what appeared to be a working rollover image.

First, I edited the original image so that the part that needed to change colors was transparent. Then, placed the image in my blog post on a white background. Finally, created a CSS class such that the background changes color on hover.

Voila! Instant fake rollover image.

Maybe it’ll help you next time you can’t, or don’t want to, bother with Javascript.

jQuery 1.2! Woo!

Tom's picture
Tags: 

I'm kind of a jQuery fanboy. Nontechnical friends following my Twitter feed are sick of hearing about it; my colleagues at EchoDitto have learned to avoid mentioning competing JS libraries around me, lest they be subjected to a long and increasingly enthusiastic speech about why they should be using jQuery instead. It's a bit embarrassing. I've used script.aculo.us, moo.fx, and read enough of the Dojo docs to become deeply confused. But jQuery's the one for me.

And, excitingly, a new version was released on Monday. Let's have a look at the biggest changes, shall we (or at least the ones that seem most immediately relevant to me)?

pretty darn cool

Tom's picture
Tags: 

A free flash-based 3D globe? That's scriptable? Neat! Throw in some IP-based geocoding courtesy of hostip.info and you've got yourself a demo.