jquery

DrupalCon Topics!

Two of my topics were chosen for DrupalCon 2010 in San Francisco!


DrupalCon 2010, San Francisco

More details soon.

Write your own jQuery accordions in 7 lines of code.

A lot of times, people want very specific functionality out of a jquery menu. There are at least 5 or 6 decent jQuery accordion menu plugins out there. But they're all overkill in my opinion.

A jQuery accordion can be as little as 3 lines of code. Here's one in 7 lines of code. And if you do some chaining, probably even less.

$('#accordion li ul').hide();
$('#accordion li a').click(function(){
	$(this).parent().addClass('selected');
	$(this).parent().children('ul').show('fast');

Another new site layout

So I put together a real quick new site layout. You need to use the arrow keys or your mousewheel to switch between posts. I will add some arrows and such later to make it more clear. I realize that this is not the most practical way to read a blog and many people won't like it. Thankfully, hardly anyone reads my blog, so I can't be upsetting too many people.

I also noticed that the animation runs a LOT smoother on Chrome/Safari than it does on Firefox 3.5. Haven't even bothered to test with IE yet.

Syndicate content