background preloader

JavaScript

Facebook Twitter

AngularJS

Reveal Animations When Scrolling — WOW.js. Spin.js. Example Features No images, no external CSS No dependencies (jQuery is supported, but not required) Highly configurable Resolution independent Uses VML as fallback in old IEs Uses @keyframe animations, falling back to setTimeout() Works in all major browsers, including IE6 MIT License Spin.js dynamically creates spinning activity indicators that can be used as resolution-independent replacement for AJAX loading GIFs.

spin.js

Usage The spin() method creates the necessary HTML elements and starts the animation. Manual insertion In order to manually insert the spinner into the DOM you can invoke the spin() method without any arguments and use the el property to access the HTML element: var spinner = new Spinner().spin(); target.appendChild(spinner.el); Positioning Since version 2.0.0 the spinner is absolutely positioned at 50% of its offset parent. Hiding the spinner To hide the spinner, invoke the stop() method, which removes the UI elements from the DOM and stops the animation. jQuery plugin Changes. Arbor.js. When should I use an MVC framework in JavaScript.

JavaScript Guide - JavaScript. The JavaScript Guide shows you how to use JavaScript and gives an overview of the language. If you need exhaustive information about a language feature, have a look at the JavaScript reference. This Guide is divided into the following chapters. Introduction Grammar and types Control flow and error handling. Eloquent JavaScript. Industry Leading JavaScript Framework for Building Desktop Web Apps. Browser Detection » The MooTorial. Top Browser Detection Browser.js in Core includes a browser detection variables added to the Browser hash object.

Browser Detection » The MooTorial

For the most part, MooTools smooths over the differences between browsers and you shouldn't find yourself needing to reference these variables very often. However, there are times when you need to know, and MooTools provides. There's not a lot to describe here other than these things exist and you can use them in your code. ... if (Browser.Engine.trident4) //...do something for IE6else if (Browser.Engine.trident) //...do something for all other version of IEelse //...everyone else gets some standard behavior ... Oop - How can I emulate "classes" in Javascript? (with or without a 3rd party library) 3 ways to define a JavaScript class.

Introduction JavaScript is a very flexible object-oriented language when it comes to syntax.

3 ways to define a JavaScript class

In this article you can find three ways of defining and instantiating an object. Make OOP Classes in JavaScript. Anyone who has tinkered with the Prototype model in JavaScript to produce classes as we know them in other languages has generally left web programming all together and taken up a career as a bus driver.

Make OOP Classes in JavaScript

There are a coterie of frameworks designed specifically to address this problem. But what if you’re not wild about frameworks, preferring instead to build tools specifically suited to your needs and style? For you, there is some black magic that can revolutionize the way you interact with the current JavaScript standard (someone please thaw me out when the 2.0 standard is implemented in June 2134, or whatever the projected date is). What you’ll need. Get Started With Prototype. Much of the web counts on JavaScript for its interactivity and for many years it was difficult to write.

Get Started With Prototype

Browser inconsistencies and complicated code made even advanced coders grimace. JavaScript frameworks, such as Prototype, jQuery and MooTools have taken much of the pain away. These frameworks sit on top of JavaScript and make common tasks a whole lot easier. Prototype is the granddaddy of JavaScript frameworks. It was the first to gain wide popularity, probably due to its pairing with the Ruby on Rails server-side programming framework.

In this tutorial, I’ll provide an introduction to the Prototype way of writing JavaScript. Let’s get started learning Prototype and writing shorter, hassle-free JavaScript. What You Need Knowledge of HTML and CSS Basic JavaScript experience A copy of the Prototype source file. Start With Some HTML Before we dive into Prototype, we need to set up the HTML for the examples I’ll show you in this tutorial. Opened in a browser, the above is blank. JavaScript Tutorial: Functions and Classes. Written by Jon Perry There are programs that require a lot of generality, and programs that need to use the same piece of code again and again, which usually means some code should be separated from the main program so it can be called on repeatedly.

JavaScript Tutorial: Functions and Classes

In computer jargon, we need flexibility, modularity and re-usability. Implementing these concepts in a computer language involves constructs that are not completely necessary, but do save a lot of time and effort. The first of these that we will discuss is the function. Functions The most basic purpose of a function is to contain code. Once we have defined a function, we can call it from anywhere, and any number of times. <HTML><HEAD><TITLE>Functions</TITLE><SCRIPT>function hello() {document.write('Hello');}hello();</SCRIPT></HEAD></HTML> As we see, Hello is written to the screen.

In JavaScript, we do not have to define the function before we use it, so we could equally type: Meteor JS framework - real-time magic - Cobbweb.

Jquery

Examples. Highcharts JS.