Posts tagged ‘javascript’

Simple expandable menu with jQuery

by Josh Fraser on May 1, 2010


I recently needed a nested and expandable navigation system (accordion style) for a project I was working on.  I took a look around at the existing jquery plugins and was surprised by the complexity of them. To me, there's no reason for a simple menu ...

Backwards compatible window.postMessage()

by Josh Fraser on January 15, 2010


Simple cross-domain messaging This blog post explains how to implement a backwards compatible version of window.postMessage() to handle all your cross-domain messaging needs. If you’re in a hurry, you can skip directly to the demo or just grab ...

Stop flash from covering HTML content

by Josh Fraser on August 13, 2009


Browse through a few developer forums and you will find lots of people pulling their hair out over flash content covering up their dropdown menus or modal windows.  The problem is especially bad in IE (surprise, surprise). The fix is actually quite ...

Queue events that occur before JavaScript is loaded

by Josh Fraser on June 24, 2009


One of the common recommendations for speeding up your website is to put your JavaScript at the bottom of your page instead of including it inside the head tag. The difference this simple placement can have is impressive, especially if you are dealing ...

Reading GET variables with JavaScript

by Josh Fraser on June 10, 2009


One of the things that isn't immediately obvious in JavaScript is how to access GET variables. I've seen lots of different implementations for this around the web, but the majority of them are bulkier than they need to be. Here's my favorite way to ...

Auto detect a time zone with JavaScript

by Josh Fraser on June 8, 2007


This blog post will attempt to explain how to automatically detect your user's time zone using JavaScript. If you're in a hurry, you can skip directly to the demo or just grab the files index.html detect_timezone.js Previous attempts to solve ...