JMan Using jQuery

Posted in JavaScript
2010-05-10 22:35:47 +0000 UTC

As part of my site relaunch, I needed to rewrite a couple of things using jQuery instead of Mootools. One of these things is the Man Page footer at the bottom of the site. Rewriting it using jQuery actually ended up being fairly easy.

Non-breaking Space Using MooTools setText()

Posted in JavaScript
2009-10-08 01:34:10 +0000 UTC

I was working on a bit of script today, and happened upon an interesting happenstance. I was trying to change the text of an element dynamically, and this text needed to include a non-breaking space. My original code seemed to render the entity as text, so this:

elem.setText( ' ' );

literally printed the text " " instead of the proper entity.

Stop Propagating Events in Mootools 1.11

Posted in JavaScript
2009-07-20 15:37:07 +0000 UTC

If you've ever done any scripting using the Mootools library that ships with Joomla, perhaps you've come across a situation where you needed to prevent a link from following it's assigned location. Mootools has a function for Events called 'stop', but it is not extended to Events in 1.11. So how do you stop the link from following it's href?

Konami Code

Posted in JavaScript
2009-06-25 22:51:06 +0000 UTC

There's a really cool site at that lists a whole bunch of sites that have easter eggs if you type a certain pattern while visiting. That pattern is the famous Konami Code. It lists some pretty large sites, like Facebook and Digg.

I went ahead and wrote a quick little bit of JavaScript that implements this functionality. It's loaded into the site you're looking at right now!

JavaScript Man Page Footer

Posted in JavaScript
2009-06-07 06:02:16 +0000 UTC

Some of you may have noticed the box at the bottom of the screen that keeps track of the page's vertical position. I wrote this in Mootools to sort of mimic some command line Linux tools like "less", "more", and "man".

XHTML Strict and Link Targets

Posted in JavaScript
2009-04-29 00:06:38 +0000 UTC

Valid XHTML Strict doesn't support the 'target' tag for links, but some webmasters (me included) don't like the idea of having external links draw our visitors away, possibly to never return. That's why the 'target' tag is great - external links can open new windows (or tabs, browser willing), right?


Posted in JavaScript
2009-04-27 02:16:23 +0000 UTC

You may have noticed that some of the links on this site are followed by the domain in brackets. This is something I really liked about links posted on Slashdot, so I figured I'd go ahead and do my own little rendition of this functionality.

IE and Opera Vertical Resize

Posted in JavaScript
2009-04-25 21:36:36 +0000 UTC

While working on this template, I was having an issue with both IE and Opera not rerendering things properly if the browser window was only resized vertically. What's odd is that certain JavaScript hover events would force some elements to be redrawn, thus "fixing" the problem.

Below is the short script I wrote to force IE and Opera to redraw a specific element, the wrapper of the site. It requires Mootools 1.11.

JavaScript Array Functions

Posted in JavaScript
2009-03-29 16:38:56 +0000 UTC

I've been going through my $HOME looking for things to post, and came across this little snippet:

Tiny jQuery Accordion Menu

Posted in JavaScript
2009-03-28 22:23:50 +0000 UTC

I wrote a little jQuery script for accordion menus. Hope you like it: