background preloader

Javascript

Facebook Twitter

Superhero.js. Using Google's Closure to Compile and Verify your JavaScript. 7, Mar 2013 A large application is nearly guaranteed to come with an equally large amount of JavaScript attached to it.

Using Google's Closure to Compile and Verify your JavaScript

During development it makes sense to divide the JavaScript of the application into multiple sensibly named files both to make finding specific functionality in the code base easier, and to keep the file length to a reasonable size for readability/comprehension purposes. More importantly though, this allows you to build modular, reusable components by separating functionality and sharing common methods within the application.

However, when it comes time to move your site to the production environment, this development processes' inefficiencies become noticeable in slow loading pages. The most obvious pitfall is the fact that having multiple different files means that new HTTP requests have to be issued for each file, bringing with it an additional round trip time. Introducing Google Closure. Using Web Workers to Speed-Up Your JavaScript Applications. The performance of JavaScript applications running in the browser has increased considerably over the past few years.

Using Web Workers to Speed-Up Your JavaScript Applications

This is mainly due to continued work on the underlying JavaScript engines (such as V8) that actually execute the code. But as these JavaScript engines get faster, our web applications also demand more. The introduction of JavaScript APIs like the File API has made it possible to write JavaScript applications that are undertaking some serious computational tasks on the client-side. Despite the improvements in JavaScript engines, it is not uncommon for users to encounter frozen user interfaces as the browser works through resource intensive tasks. A Deeper Dive into jQuery Mobile. There’s no doubt that mobile Web applications are here to stay.

A Deeper Dive into jQuery Mobile

As I said at the start of the previous article in this series, talk to any C-level executive at a major company or any technology startup, and they’ll tell you about mobile apps. jQuery Mobile (jQM) provides a JavaScript framework that allows developers to easily add a mobile look and feel to their Web applications. In this article I’ll dig into some advanced features of jQuery Mobile that—with some programming—a developer can use to provide an application that looks and feels very similar to a native app running on a device. Here’s what I’ll cover: $.mobile. Configuration of jQuery Mobile jQM comes with a new object—the mobile object—which is available off the main jQuery object, $.

Note: The $.mobile object is not available until after the mobileinit event is fired. In the previous article, I described examples of using a “data-”attribute on elements. For example, the $.mobile object can be extended as follows: Announcing the jQuery Plugin Registry. They say good things come to those who wait, and today we’re happy to end the waiting and unveil the jQuery Plugin Registry.

Announcing the jQuery Plugin Registry

We’ve worked long and hard to put together a brand new site that will serve to reduce the fragmentation and distribution problems that can be obstacles for plugin developers and consumers. We’ve also put an emphasis on remedying a number of the issues that plagued the old jQuery plugins site, especially with respect to workflows for contribution of both plugins and enhancements to the repository itself. The goal is to make sharing and browsing quality jQuery plugins a pleasant experience for everyone! jQuery Plugin Registry: plugins.jquery.comSource/Documentation/Issues: github.com/jquery/plugins.jquery.com Downloading and Using Plugins. Draw a Stickman. Nouvelle Vague by ultranoir. 35 top examples of JavaScript. JavaScript creates platforms that can engage a user and ensure that they remember your site and continue to revisit.

35 top examples of JavaScript

It can be used to create games, APIs, scrolling abilities and much more. The internet is full of web design inspiration, including great examples of JavaScript being used to bring a website to life and provide great user experiences. Here we pick some of our favourite examples of JavaScript in action for your inspiration. 01. Histography If you've ever watched Cosmos, you may remember Carl Sagan talking about the Cosmic Calendar. 14 billion years of events is a huge dataset, and displaying it in a browser is no easy task. The son of a historian, Stauber created Histography as a student at Bezalel Academy of Arts and Design, under the guidance of Ronel Mor. The site scans and indexes events from Wikipedia, grabs the article, and pulls in a Google image and YouTube video. 02. 03.

For this website about the history of the St. Stringify - JavaScript. The JSON.stringify() method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified, or optionally including only the specified properties if a replacer array is specified.

stringify - JavaScript

Syntax JSON.stringify([, [, ]]) Parameters value. A Javascript When Function. Mon Feb 20 2012 function when(conditionFunc, execFunc, interval){ if (conditionFunc()){ execFunc(); }else{ setTimeout(function(){ when(conditionFunc, execFunc, interval);}, interval); } }

A Javascript When Function

Documentation. JSHint is a program that flags suspicious usage in programs written in JavaScript.

Documentation

The core project consists of a library itself as well as a CLI program distributed as a Node module. More docs: List of all JSHint options · CLI flags · Writing your own reporter · FAQ Basic usage The easiest way to use JSHint is to install it as a Node program. To do so, simply run the following command in your terminal (flag -g installs JSHint globally on your system, omit it if you want to install JSHint in the current working directory): $ npm install jshint -g. Tips, tricks, tutorials & screencasts to improve your JavaScript.