I use the TypeScript compiler for this, since its output is more minimal than Babel's. The following will transpile...

...not necessarily a link or button, but could be any HTML element with a Javascript event binding. The easiest way to get this step is to use Spreewald. If you...

ng-newsletter.com

Search engines, such as Google and Bing are engineered to crawl static web pages, not javascript-heavy, client-side apps. This is typical of a search engine which does not...

...render javascript when the search bot is crawling over web pages. This is because our javascript-heavy apps need a javascript engine to run, like PhantomJS or v8, for instance...

...After trying jQuery's trigger to no avail, I had success by using native Javascript methods to create and dispatch an event. For instance, to trigger a mousedown event:

coding.smashingmagazine.com

JavaScript engines such as Google’s V8 (Chrome, Node) are specifically designed for the fast execution of large JavaScript applications. As you develop, if you care about memory usage and...

...aware of some of what’s going on in your user’s browser’s JavaScript engine behind the scenes...

github.com

...they forgot one very important part, the ability to use it when responding to JavaScript (JS) requests! In Rails 3.1 it’s incredibly easy to build your application’s JavaScript...

...an AJAX request to your application you can only write your response using regular JavaScript and not CoffeeScript, at least until CoffeeBeans came along...

...for the given label, then checks if that field is hidden via CSS (or Javascript). It is not currently tested if the label is visible or hidden. For this see...

github.com

ExecJS lets you run JavaScript code from Ruby. It automatically picks the best runtime available to evaluate your JavaScript program, then returns the result to you as a Ruby object...

If you want a class-like construct in JavaScript, you can use the module pattern below. The module pattern gives you basic class concepts like a constructor, private state, public...

Since the module pattern only uses basic JavaScript, your code will run in any browser. You don't need CoffeeScript or an ES6 transpiler like Babel. A cosmetic benefit...

blog.arkency.com

Amazing guide how to divide a ball of Javascript spaghetti distinct separate layers (model, view, controller, backend adapter). It does not use a Javascript framework...

Use this if you want to show or hide part of a form if certain options are selected or boxes...

...order to navigate through the browser history. you can manipulate the window.history object via javascript like follows: When /^I go back in the browser history$/ do page.evaluate_script('window.history.back()')

github.com

JavaScript structures that include circular references can't be serialized with a"plain" JSON.stringify. Example: a = { name: 'Groucho' }; b = { name: 'Harpo', sibling: a }; a.sibling = b; Doing a JSON.stringify(a) will...

So you want to find out how many horizontal pixels you have available on a mobile device. This is super...

makandra dev
javascript.info

To move elements around we should be familiar with coordinates. Most JavaScript methods deal with one of two coordinate systems: Relative to the window(or another viewport) top/left.

dmitrybaranovskiy.github.io

Raphaël is a small JavaScript library that should simplify your work with vector graphics on the web. If you want to create your own specific chart or image crop and...

javascriptweblog.wordpress.com

...s legendary Functional library, here’s a lightweight tool to help keep track of JavaScript invocations. It works in Chrome, Safari, Firebug and IE8...

momentjs.com

A lightweight javascript date library for parsing, manipulating, and formatting dates...

tutorialzine.com

...implements the technique in this card with tests and all caveats fixed. Related topic: JavaScript: Working with Query Parameters Javascript: Read params from url...

The basic idea is pretty simple: an element's height is accessible via the offsetHeight property, its drawn height via...

...triggers events that were registered through jQuery. Events registered through CSS or the native Javascript registry will not trigger...

makandracards.com

...t reliably work in Selenium features. I overhauled the entire step so it uses Javascript to detect visibility in Selenium. The step has support for jQuery and Prototype projects, so...

...hash to its asset paths by default. This means that when you write this: <%= javascript_include_tag 'all.js' %> ... you always get the same path, regardless of the contents of all.js...

harvesthq.github.com

Chosen is a JavaScript plugin that makes long, unwieldy select boxes much more user-friendly. It is currently available in both jQuery and Prototype flavors...