Wednesday, April 1st, 2009

Building a triple click

Category: JavaScript, Library

Brandon Aaron has a nice article on building a special event for triple clicking on an element using jQuery. To illustrate the API I’m going to create a new event type called “tripleclick”. To be fired it will require the user click the element three times. If we were to make this a typical jQuery Read the rest…

Posted by Dion Almaer at 3:19 am

2.9 rating from 40 votes

Tuesday, March 31st, 2009

The differences between Callbacks and Events

Category: JavaScript

Dean Edwards has a subtle piece on callbacks vs. events where he calls out the issue of libraries that support custom events dying out when one custom event dies. First, Dean sets the stage: < View plain text > javascript document.addEventListener("DOMContentLoaded", function() {   console.log("Init: 1");   DOES_NOT_EXIST++; // this will throw an error }, Read the rest…

Posted by Dion Almaer at 6:03 am

4.3 rating from 25 votes

Monday, March 30th, 2009

Improved Readability for JavaScript Unit Tests

Category: JavaScript, Testing

Christian Johansen is tired of: mentally decoding test names like “testNewUserWithClownShoesShouldSqueak”, so I’ve written some code to improve readability for JavaScript unit tests written using JsUnitTest (from prototypejs). It’s heavily inspired by Ruby frameworks Shoulda and Context. Tests with his new framework–called jscontext–look like this: < View plain text > js new Test.Unit.Runner({     Read the rest…

Posted by Ben Galbraith at 9:07 am

3.1 rating from 17 votes

Prototype 1.6.1 RC2: IE 8 Here we come

Category: JavaScript, Library, Prototype

Andrew has posted on Prototype 1.6.1 RC 2, a new release that “is fully compatible — and fully optimized for — Internet Explorer 8’s “super-standards” mode. In particular, Prototype now takes advantage of IE8’s support of the Selectors API and its ability to extend the prototypes of DOM elements.” New Features Full compatibility with Internet Read the rest…

Posted by Dion Almaer at 12:15 am
1 Comment

3.8 rating from 49 votes

Friday, March 27th, 2009

JSTalk: AppleScript without the weird language

Category: Apple, JavaScript

Gus Mueller has announced JSTalk, an alternative to AppleScript that uses JavaScript and the JSCocoa bridge, and an Objective-J-like language alternative to hide the ugly_methods_when_needed. Here is Gus: JSTalk’s goal can described like this: JSTalk is to AppleScript, what Cocoa is to Carbon. I know, I know. It’s a lofty, crazy goal. But someone has Read the rest…

Posted by Dion Almaer at 1:16 am
Comment here

4.2 rating from 33 votes

Thursday, March 26th, 2009

Querying the DOM on the Sly

Category: CSS, JavaScript, Library

Remember when we thought there may be less CSS selector engines? :) Instead we have renewed performance-based competition among them. Sly is the latest selector engine created by Harald Kirschner. To use, it looks like this: < View plain text > javascript // Finds all odd rows in all tables var rows =‘table td:odd’); Read the rest…

Posted by Dion Almaer at 11:37 am

4.2 rating from 57 votes

jQTouch: a mobile WebKit JavaScript framework

Category: iPhone, JavaScript, Library, Mobile

David Kaneda has created jQTouch a “jQuery plugin with native animations, auto list navigation, and default application styles for Mobile WebKit browsers like iPhone, G1, and Pre.” Features Setup jQTouch can now be initialized with one function: < View plain text > javascript $(document).jQTouch({    icon: ‘jqtouch.png’,    statusBar: ‘black-translucent’ }); This function writes all Read the rest…

Posted by Dion Almaer at 4:02 am

3.5 rating from 54 votes

Wednesday, March 25th, 2009

TestSwarm: Scaling JavaScript Tests

Category: Browsers, JavaScript, Testing

John Resig is working on a new tool that tries to help us scale our JavaScript testing. When building an Ajax application, how nice would it be to have a system running tests across multiple browsers and platforms? This is necessary for anything more than a toy, especially since we have some flexible software that Read the rest…

Posted by Dion Almaer at 7:16 am

3.7 rating from 21 votes

JuicyDrop: More fun with music visualizations

Category: Canvas, JavaScript, Showcase

Jacob Seidelin is at it again, with another music visualization using canvas and more: A couple of weeks ago I played around with music visualization using JavaScript/canvas and SoundManager2. Well, I couldn’t leave it at that and as I mentioned in the comments, I had an eye on the MilkDrop plugin for Winamp. The result Read the rest…

Posted by Dion Almaer at 4:17 am

4.6 rating from 36 votes

Monday, March 23rd, 2009

Debounce your JavaScript functions

Category: Articles, JavaScript, Library

John Hann has written an enjoyable post on debouncing JavaScript methods that comes with a fun back story on a project that John worked on. John gets to the matter of debouncing: Debouncing means to coalesce several temporally close signals into one signal. For example, your computer keyboard does this. Every time you hit a Read the rest…

Posted by Dion Almaer at 8:11 am

4.2 rating from 22 votes

Wednesday, March 18th, 2009

iPhone 3.0 now with SquirrelFish Extreme?

Category: iPhone, JavaScript, Mobile

James Churchman did a quick bit of detective work and pointed the iPhone 3.0 simulator on the WebKit detector that we blogged about in the past. The new showed this: Compared to the old version:

Posted by Dion Almaer at 10:12 am

3.7 rating from 15 votes

KeyTable: Instant keyboard navigation in a table

Category: JavaScript, Library, Utility

Allan Jardine is up to his old tricks again (his tricks are: creating helpful small tools!). This time he has created KeyTable, a library that adds the ability to use the keyboard to navigate around an HTML table. Events can be bound (and unbound) to cells as required by the developer, allowing increased accessibility to Read the rest…

Posted by Dion Almaer at 12:16 am

4.1 rating from 16 votes

Monday, March 16th, 2009

More Particles in JavaScript

Category: Fun, JavaScript

A long time ago we covered a simple particle engine in JavaScript, used to produce a toy fire effect (about two years later it was ported to canvas and got much faster). Pawel Witkowski wrote in with another particle demo, this one as a teaser to his promised future full-featured JavaScript particle framework: I spent Read the rest…

Posted by Ben Galbraith at 9:00 am

3.9 rating from 30 votes

Crock on Floating Points in JavaScript

Category: JavaScript

Over on the YUI blog, Douglas Crockford wrote a piece discussing why JavaScript’s current numeric type is problematic: JavaScript has a single number type: IEEE 754 Double Precision floating point… Unfortunately, a binary floating point type has some significant disadvantages. The worst is that it cannot accurately represent decimal fractions, which is a big problem Read the rest…

Posted by Ben Galbraith at 7:59 am

3.9 rating from 17 votes

JavaScript version of XEyes

Category: Fun, JavaScript

Let’s start out the week with a bit of fun. David King has a little “port” of the good ‘ole xeyes into JavaScript and it is a surprisingly small amount of code. He goes into how it all works in his article, covering the code like this: < View plain text > javascript // Get Read the rest…

Posted by Dion Almaer at 7:48 am

3.4 rating from 38 votes

Friday, March 13th, 2009

GX: A new animation framework

Category: JavaScript, jQuery, Library, UI

Riccardo Degni has created GX, his latest animation framework. He actually created moo.rd in the past, and this time he is playing on top of jQuery: I’ve developed GX keeping in mind mainly two Design Patterns: the “Write Less, Do More” Pattern picked from the jQuery Library. With GX you’ll always write as less code Read the rest…

Posted by Dion Almaer at 7:24 am

1.8 rating from 102 votes