background preloader

JavaScript

Facebook Twitter

JavaScript. iPhone, Android, Blackberry, PHP, Generatrix, Wordpress App Development in Pune, India. We started working with Angular.js recently and after spending a few days on it, I realised that there a big need for beginner tutorials on it.

iPhone, Android, Blackberry, PHP, Generatrix, Wordpress App Development in Pune, India

Tangle: API Reference. Contents HTML attributes class I want <span class="TKAdjustableNumber" data-var="cookies"></span> cookies.

Tangle: API Reference

The class attribute normally specifies a CSS class which gives an element a style. With Tangle, it can also specify a JavaScript class which gives an element a behavior. Presentation tool based on the power of CSS3 transforms and transitions in modern browsers. CSS3 Create - Démos, tutoriels et expériences CSS3 : menus, galerie photos, interfaces web.

Raphaël—JavaScript Library. Morris.js. Underscore.js. Underscore is a JavaScript library that provides a whole mess of useful functional programming helpers without extending any built-in objects.

Underscore.js

It’s the answer to the question: “If I sit down in front of a blank HTML page, and want to start being productive immediately, what do I need?” … and the tie to go along with jQuery's tux and Backbone's suspenders. Underscore provides 80-odd functions that support both the usual functional suspects: map, select, invoke — as well as more specialized helpers: function binding, javascript templating, deep equality testing, and so on. It delegates to built-in functions, if present, so modern browsers will use the native implementations of forEach, map, reduce, filter, every, some and indexOf. 50 Useful JavaScript Tools - Smashing Magazine. Advertisement By Jacob Gube JavaScript is a powerful client-side scripting language used in many modern websites and Web applications.

In the hands of a skilled Web developer, JavaScript can enhance the user’s experience of the website and provide rich interactive components and features. But even though syntactically simple in nature, JavaScript is often difficult to author because of the environment it runs in: the Web browser. JavaScript’s popularity is evident in emerging technologies, such as Adobe AIR, which use it as a supported language for creating desktop-based applications. Scriptular. L'objet Math. Essential JavaScript Design Patterns For Beginners. Design patterns are reusable solutions to commonly occurring problems in software design.

They are both exciting and a fascinating topic to explore in any programming language. One reason for this is that they help us build upon the combined experience of many developers that came before us and ensure we structure our code in an optimized way, meeting the needs of problems we're attempting to solve. Design patterns also provide us a common vocabulary to describe solutions. JavaScript Programming Patterns. JavaScript is meant to be used to add behaviour to a website, might it be for form validation or for more complex operations like drag & drop functionality or performing asynchronous requests to the webserver (aka Ajax).

JavaScript Programming Patterns

During the past few years, JavaScript libraries became increasingly popular. One of the reasons is definitely that websites are getting more and more complex and reinventing the wheel each time is not acceptable if you are working on a tight schedule. But letting aside libraries and focusing on the “bare” syntax of JavaScript, it is very valuable to know what kind of options you have in terms of programming patterns when writing JavaScript. In this article I am trying to present some of the techniques out there that I have discovered.

The patterns I would like to mention are the following: Metaprogramming javascript. Learning Advanced JavaScript. Basic JavaScript Part 12: Function Hoisting. Here are the links to the previous installments: In a previous post I already discussed the phenomenon of hoisting in JavaScript.

Basic JavaScript Part 12: Function Hoisting

In that post I showed the effects of variable hoisting and why it’s important to declare all variables at the top of a function body. For this post I want to briefly focus on function hoisting. Google JavaScript Style Guide. We follow the C++ formatting rules in spirit, with the following additional clarifications.

Google JavaScript Style Guide

Curly Braces Because of implicit semicolon insertion, always start your curly braces on the same line as whatever they're opening. For example: if (something) { // ... } else { // ... } Array and Object Initializers Single-line array and object initializers are allowed when they fit on a line: Object Oriented Programming in JavaScript.

Introduction The first version of this paper, written in 2003, had several shortcomings, not the least of which was that the techniques described were specific to Internet Explorer.

Object Oriented Programming in JavaScript

I've updated and improved on the original, to document the current state of the art, especially in light of the extensive interest in AJAX technology and the increasing adoption of the FireFox browser. Using Objects to Organize Your Code - rmurphey. RequireJS. Usage§ 1 Load JavaScript Files§ 1.1 RequireJS takes a different approach to script loading than traditional <script> tags.

RequireJS

While it can also run fast and optimize well, the primary goal is to encourage modular code. As part of that, it encourages using module IDs instead of URLs for script tags. RequireJS loads all code relative to a baseUrl. Or, baseUrl can be set manually via the RequireJS config. RequireJS also assumes by default that all dependencies are scripts, so it does not expect to see a trailing ".js" suffix on module IDs. There may be times when you do want to reference a script directly and not conform to the "baseUrl + paths" rules for finding it. Ends in ".js".Starts with a "/".Contains an URL protocol, like "http:" or "https:". In general though, it is best to use the baseUrl and "paths" config to set paths for module IDs.

Www/ index.html js/ app/ sub.js lib/ jquery.js canvas.js app.js require.js in index.html: and in app.js: JavaScript pattern and antipattern collection.