...time by only registering a single listener. When the descendants are changed dynamically via JavaScript, no additional event listeners must be registered to enhance new elements. This technique has some...
In the example above the container receives all click events and must run JavaScript to check if a .message element was hit. This can degrade performance when you deal...
...some icon names, and introduces new prefixes fab, far, and fas. There is a JavaScript shim that you can use as a "quick fix". It allows you to keep v4...
Build dashboards using ascii/ansi art and javascript
Responsive Lightbox JavaScript that just works. You can use it for single images or a gallery. Animations are optional...
Create beautiful Javascript charts with one line of Ruby. Promising chart library for easily rendering charts with Google Charts. This seems to not submit your data points to Google...
CodeMirror is a JavaScript component that provides a code editor in the browser. When a mode is available for the language you are coding in, it will color your code...
...notifications using WebKit's webkitNotifications API. This means you can create popup bubbles from Javascript...
Since images are magnitudes larger in file size than text (HTML, CSS, Javascript) is, loading the images of a large web page takes a significant amount of the...
...they enter the viewport – aka "lazy-loading images". General Issues Crawlers do not execute JavaScript (generally speaking). When removing the src attribute of an img tag in favor of lazy...
To test that an object was constructed by a given constructor function, use jasmine.any(Klass): describe('plus()', function() { it ('returns...
...browser must load via a separate request. While this transformation minimizes the amount of JavaScript transmitted, it may also cause your initial bundle to be split into multiple files, which...
Quick reference for passing data from Rails to JavaScript via Unpoly compilers. Haml Attribute Syntax # Ising hash rockets and string symbols (method calls) = form.text_field :name, 'date-picker': true
...up.element.booleanAttr(element, attr) up.element.numberAttr(element, attr) up.element.jsonAttr(element, attr) Quick Reference Use Case Haml JavaScript Access Simple string { 'data-id': @id } data.id (string) Multiple strings { 'data-id': @id, 'data-name...
Flotr is a javascript plotting library based on the Prototype Javascript Framework (version 1.6.0.2 at the moment) and inspired by Flot (written by Ole Laursen...
sing Google’s JavaScript Library CDN comes with a 1/3 of a second tax on missing. (Note that a tax like this applies to opening connections to a any new...
...host: JavaScript Library CDNs, advertisers, analytics and visitor tracking, etc. This is why you should try to reduce the number of different hostnames you serve content from...
Because javascript has something called "Hoisting" which makes your code do things it doesn't look like it should be doing. Basically, that means a javascript interpreter will move all...
Cross-Origin Resource Sharing (CORS) is a browser technology specification, which defines ways for a web service to provide interfaces...
...E.g. console.log("Current string:", string, "Current number:", 12) Your output can have hyperlinks to Javascript objects E.g. console.log("Check out the current %o, it's great", location) Displaying tabular data...
...a simple tag in your HTML, or by instantiating a new Audio object from Javascript. No additional libraries are required, although browser implementations are so bad you will probably want...
...will be broken for VBR MP3s in Flash mode). The libraries usually have a Javascript API that is nicer than the ones provided by the browser and plain Flash, and...
...your footprint small. Check your JS bundles Webpack(er): Analyze the size of your JavaScript components
...you can use most ES6 features without a build step. Just deliver your plain JavaScript without transpilation through Babel or TypeScript, and modern browsers will run them natively. Features supported...
...Rails with the assets pipeline (sprockets) you are probably using Uglifier to minify your JavaScript. Uglifier can minify some, but not all ES6 language features. Check if you're affected...
We’ve been working on one of our first Angular projects with a Rails backend. It’s been a great...
window.getSelection().toString(); Browser support: IE9+, Android 4.3+, Safari 5+
A JS library that allows you to embed an iframe that automatically shrinks or expands to match its content.
RulersGuides.js is a Javascript library which enables Photoshop-like rulers and guides interface on a web page Also available as a bookmarklet...
...checking. We'll explore what this means in practice. TypeScript is a superset of JavaScript, meaning TypeScript compiles down to native JavaScript syntax and checks type consistency only at compile...