JavaScript Roots: Core Language Essentials

(That’s a presentation embedded above. Use your left/right arrow keys to navigate through it. You might need to click it first in order to focus it.) Whilst we, JavaScript developers, are nowadays spoiled with tools, frameworks, build systems, etc. we might tend to forget some of the core things contained in the JavaScript language. Think …

Web Animations now in Chrome

snowFlake.animate([ {transform: ‘translate(‘ + snowLeft + ‘px, -100%)’}, {transform: ‘translate(‘ + snowLeft + ‘px, ‘ + window.innerHeight + ‘px)’} ], { duration: 1500, iterations: 10, delay: 300 }); Glad to see this one land 🙂 Web Animations – element.animate() is now in Chrome 36 → Related: Web Animations Preview Web Animations Polyfill

ngCordova – Cordova with the power of AngularJS

module.controller(‘PictureCtrl’, function($scope, $cordovaCamera) { $scope.takePicture = function() { $cordovaCamera.getPicture({ // See all the possible Camera options from the Camera docs [1]: /// https://github.com/apache/cordova-plugin-camera/blob/master/doc/index.md#cameraoptions }).then(function(imageData) { // Success! Image data is here }, function(err) { // An error occured. Show a message to the user }); } }); ngCordova is a set of AngularJS extensions on …

Angular Classy – Cleaner class-based controllers for AngularJS

Without Classy: app.controller(‘AppCtrl’, [‘$scope’, ‘$location’, ‘$http’, function($scope, $location, $http) { // … }]); With Classy: app.classy.controller({ name: ‘AppCtrl’, inject: [‘$scope’, ‘$location’, ‘$http’], //… }); Angular Classy →

Using Encapsulation for Semantic Markup

UPDATE: This demo no longer works as createShadowRoot got replaced with attachShadow + shadow roots can only be created on a limited set of elements nowadays. See the Pen A Pen by chrismichaelscott on CodePen. As designers, we may want to style something in a certain way, but sometimes end up having to go to …

randomColor – A color generator for JavaScript

There are lots of clever one-liners for generating random colors: ‘#’+Math.floor(Math.random()*16777215).toString(16); Unfortunately, this code naturally produces lots of greys and browns and murky greens. randomColor generates attractive colors by default. More specifically, randomColor produces bright colors with a reasonably high saturation. This makes randomColor particularly useful for data visualizations and generative art. The result pictured …

Two Way data-binding using Object.observe()

Object.observe(), part of a future ECMAScript standard, is a method for asynchronously observing changes to JavaScript objects … without the need for a separate library. It allows an observer to receive a time-ordered sequence of change records which describe the set of changes which took place to the set of these objects. Essentially, the article …

Responsive tables with Tablesaw

Set of jQuery plugins by the clever folks of Filament Group for responsive tables. Comes with a few solutions such as stack (picture above), Toggle (where one can choose which columns to show), and Swipe (where you can scroll horizontally through the columns). Columns can also be sorted. Just set some data-* attributes on your …