31st August, 2007 @ 9:02am BST
Development, JavaScript, Tutorials, Web /
The JavaScript Module Pattern is a handy pattern for JavaScript singletons. It allows a developer to scope variables and methods to a given module with both private and public visibility.
Originally proposed by Douglas Crockford (and blogged on the YUI blog by Eric Miraglia), the Module Pattern has recently been through several iterations of pimpage (look Ma — a new buzzword!) at the hands of Christian Heilmann; the first entitled “Show love to the Module Pattern” and the second, “Again with the Module Pattern“. Before reading this post, I’d recommend you read all of these articles otherwise this is going to make very little sense!
Having used the pattern quite regularly over the last six months or so, I’d like to add my two-pennies-worth to the discussion with a couple of variations on the theme…
Read more of “JavaScript Module Pattern Variations”…
30th August, 2007 @ 9:46am BST
Accessibility, Browsers, Development, JavaScript, Web /
Safari, the excellent WebKit-based browser from Apple, has long neglected to include functionality that activates a form element (such as an input, a textarea, a select etc.) when its relevant label is clicked.
Although this behaviour has been fixed in the beta of version 3, any users still browsing with version 2 or below still suffer this needless blight on web accessibility.
I’ve recently reworked the JavaScript used in Steve Marshall’s tasty channelled search solution, which requires the label to be clickable, as it hides the corresponding radio input. For this reason, I’ve written a quick bit of JavaScript to activate this behaviour.
Read more of “Fixing label in Safari”…
13th July, 2007 @ 8:58am BST
Ajax, Development, JavaScript, Web /
Recently, I’ve been working on some fairly Ajax intensive pages and, because I’m working in a team environment, the need arose for a simple bit of script to handle all the different Ajax “events”. This script needed to be small yet easy to implement
Enter the YUI. *cue Enter The Dragon theme*
So here’s a tasty little script that wraps Ajax requests and a YUI Custom Event in an instantiable object that works as an Ajax DAO…
Read more of “AjaxEvent: Using YUI custom events with Ajax”…
Previous Entries