background preloader

JavaScript

Facebook Twitter

Blackhole - Minimalistic but powerful SASS / CSS Framework. Eloquent JavaScript. Eloquent JavaScript. Understanding JavaScript Function Invocation and “this” Over the years, I've seen a lot of confusion about JavaScript function invocation.

Understanding JavaScript Function Invocation and “this”

In particular, a lot of people have complained that the semantics of this in function invocations is confusing. In my opinion, a lot of this confusion is cleared up by understanding the core function invocation primitive, and then looking at all other ways of invoking a function as sugar on top of that primitive. In fact, this is exactly how the ECMAScript spec thinks about it. In some areas, this post is a simplification of the spec, but the basic idea is the same. First, let's look at the core function invocation primitive, a Function's call method[1]. Make an argument list (argList) out of parameters 1 through the end The first parameter is thisValue Invoke the function with this set to thisValue and the argList as its argument list For example: function hello(thing) { console.log(this + " says hello " + thing); } hello.call("Yehuda", "world") hello("world") hello.call(undefined, "world");

JavaScript Madness: Keyboard Events. Javascript Madness Intro Jan Wolter 1.

JavaScript Madness: Keyboard Events

Introduction This document summarizes the results of some browser tests done while attempting to implement key stroke handling code in JavaScript. It documents inconsistancies in the way different browsers implement keyboard events. The tests were originally done with the intention of learning just enough to write the code I needed to write. Keyboard Event Properties. JavaScript Kit- Your comprehensive JavaScript, DHTML, CSS, and Ajax stop. 7 JavaScript Libraries for Specific Visualizations. Apart from the usual charts and graphs libraries used to create interactive data visualizations already covered here, which can present a steep learning curve as a price for their powerful versatility, there are many less known JavaScript libraries that specifically address a visualization type.

7 JavaScript Libraries for Specific Visualizations

They come very handy when you deal with illustrating content from data journalism with an interactive experience. Here are a few of them to start with. JSPlumb JSPlumb helps you visually connect elements: flowcharts, kitchen sinks, state machines, and hierarchical charts. It uses SVG where available and VML on IE8 and below, as it is compatible down to IE6. Its four main concepts are anchors (specific location), endpoints (visual representation of connections ends, attached to anchors), connectors (visual representation of the line that connects two elements), and overlays (connector decoration, like an arrow or a label). JS Sequence Diagrams Timeline Smallworld GitHub source JointJS Heatmap Tangle. Minigrid: minimal 2kb cascading grid layout. JavaScript Tutorial.

JavaScript Best Practices Part 1. Javascript Best Practices, Part 1 Make it Understandable Choose easy to understand and short names for variables and functions.

JavaScript Best Practices Part 1

Bad variable names: Also bad variable names: incrementerForMainLoopWhichSpansFromTenToTwenty } createNewMemberIfAgeOverTwentyOneAndMoonIsFull. JS: The Right Way. Sample Diagrams for HTML by Northwoods Software® Minimal Shows default Diagram interactivity and basic data-binding.

Sample Diagrams for HTML by Northwoods Software®

Select, move, copy, delete, undo, redo with keyboard or touch. Basic Shows many of the commands possible in GoJS, templates for Links and for Groups, plus tooltips and context menus for Nodes, for Links, for Groups, and for the Diagram. Shapes Showcases all pre-defined GoJS figures. SVG Icons Create your own custom Shapes using SVG path strings.

Grouping Demonstrates subgraphs that are created only as groups are expanded. Layer Bands Layer Bands are automatically created for each "layer" of a TreeLayout, and run perpendicular to the layout. Swim Lanes. JavaScript: The Good Parts: Douglas Crockford: 9780596517748: Amazon.com: Books. GreenSock. JavaScript - Tuts+ Code Category. Have you ever got excited by your idea for a website, but found yourself becoming miserable when trying to make it dynamic and actually run it on a server?

JavaScript - Tuts+ Code Category

With Parse.js, everyone who understands the basics of HTML, CSS, and JavaScript can create dynamic websites and working web apps. This tutorial is going to take you through the process of creating a blog system step by step with Parse.js. IntroToJavaScript_and_ModernWebDevelopment.pdf. Learn modern web application development with JavaScript. Ericelliott/essential-javascript-links. JSLint:The JavaScript Code Quality Tool. JavaScript Break and Continue. JavaScript reference.

This part of the JavaScript section on MDN serves as a repository of facts about the JavaScript language.

JavaScript reference

Read more about this reference. Global ObjectsEdit This chapter documents all the JavaScript standard built-in objects, along with their methods and properties. StatementsEdit This chapter documents all the JavaScript statements and declarations. For an alphabetical listing see the sidebar on the left. Control flow Block A block statement is used to group zero or more statements. Break Terminates the current loop, switch, or label statement and transfers program control to the statement following the terminated statement. continue Terminates execution of the statements in the current iteration of the current or labeled loop, and continues execution of the loop with the next iteration.

Empty An empty statement is used to provide no statement, although the JavaScript syntax would expect one. if...else. 3.0 and jQuery Compat 3.0 Alpha Versions Released. It’s been a long time since we did a major release, and you certainly deserve one.

3.0 and jQuery Compat 3.0 Alpha Versions Released

So we’re glad to announce the first alpha of jQuery 3.0! Despite the 3.0 version number, we anticipate that these releases shouldn’t be too much trouble when it comes to upgrading existing code. Yes, there are a few breaking changes that justified the major version bump, but we’re hopeful these breakages don’t actually affect that many people. The jQuery Migrate plugin can help you to identify compatibility issues in your code as well. Your feedback on the changes in this alpha will help us greatly, so please try it out on your existing code and plugins! QuirksMode - for all your browser quirks.

Safari Developer Library. Douglas Crockford's Javascript.