QUnit is a powerful JavaScriptunit testing framework that helps you to debug code. It’s written by members of the jQuery team, and is the official test suite for jQuery. But QUnit is general enough to test any regular JavaScript code, and it’s even able to test server-side JavaScript via some JavaScript engine like Rhino or V8.
If you’re unfamiliar with the idea of “unit testing”, don’t worry. It’s not too difficult to understand:
In computer programming, unit testing is a software verification and validation method in which a programmer tests if individual units of source code are fit for use. A unit is the smallest testable part of an application. In procedural programming a unit may be an individual function or procedure.
This is quoted from Wikipedia. Simply put, you write tests for each functionality of your code, and if all of these tests are passed, you can be sure that the code will be bug-free (mostly, depends on how thorough your tests are).
When working with events in Javascript, it is often easy to loose track of what events are subscribed where. This is particularly true if you are using a large number of events, which is typical in a modern interface employing progressive enhancement. Javascript libraries also add another degree of complexity to listeners from a technical point of view, while from a developers point of view they of course can make life much easier! But when things go wrong it can be difficult to trace down why this might be.
It is due to this allan jardine put together a Javascript bookmarklet called Visual Event which visually shows the elements on a page that have events subscribed to them, what those events are and the function that the event would run when triggered. This is primarily intended to assist debugging, but it can also be very interesting and informative to see the subscribed events on other pages.
PhoneGap is an open source development tool for building fast, easy mobile apps with JavaScript.
If you’re a web developer who wants to build mobile applications in HTML and JavaScript while still taking advantage of the core features in the iPhone, Android and Blackberry SDKs, PhoneGap is for you.
Supported Features
iPhone
Android
Blackberry
Geo Location
yes
yes
yes
Vibration
yes
yes
pending
Accelerometer
yes
yes
pending
Sound
yes
yes
pending
Contact Support
yes
pending
pending
PhoneGap aims to solve device integration by web enabling devices native functionality with open standards.
The impression of a three dimensional cube can be created using modern CSS techniques, without the need for JavaScript, imagery, canvas or SVG. Supported in recent WebKit and Gecko based browsers, most importantly Firefox 3.5+ -moz-transform and Safari 3.2+ -webkit-transform.
Briggs of Athenz has pointed his decision machine at the age old problem of choosing which darn library to choose. Now let the machine choose which library to use rather you choosing the library.
Briggs has developed an application that chooses the Framework for you.
jsPDF is an open-source library for generating PDF documents using nothing but Javascript. You can use it in a Firefox extension, in Server Side Javascript and with Data URIs in some browsers.
Client-side demo works best in Safari or iPhone Safari. Also works Firefox 3 on Windows and Opera. IE support on the way.
Server-side should work anywhere. Examples soon.
You would surely have used JQuery and Prototype for dynamic web applications like Lightview, Prototip, etc. Here i would show you how to user them two together, on the same page.
Problem
The Problem JQuery uses a “$” as a shortcut for “jQuery” and Prototype uses “$” as well. We can’t have JQuery and Prototype using the same “$” namespace.
The Fix
Thankfully JQuery has a neat little function called jQuery.noConflict( ) which you basically just need to stick at the top of your JQuery file and replace the “$” alias with “jQuery” for each function. Example:
jQuery.noConflict();
// Do something with jQuery
jQuery(“div p”).hide();
// Do something with another library’s $()
$(“content”).style.display = ‘none’;
Of course, there are other ways of solving this issue with jQuery.noConflict( )
NOTE: JQuery doesn’t get along with MooTools and YUI very well either, luckily this can also be solved with the jQuery.noConflict( ) trick.