If you want a class-like construct in JavaScript, you can use the module pattern below. The module pattern gives...
The benefit of the Rails asset pipeline is that it compiles your stylesheets and javascripts to a single file, respectively...
The Rails asset pipeline improves delivery of application assets (javascripts, stylesheets, images, fonts). Here are some basic facts about its...
Clamps (ie. cuts off) an HTML element's content by adding ellipsis to it if the content inside is too...
...which implements the technique in this card with tests and all caveats fixed. Related topic: JavaScript: Working with Query Parameters Javascript: Read params from url...
BubbleTree is a library for interactive visualization of hierarchical data. Originally developed mainly for spending data, the library is now...
Raphaël is a small JavaScript library that should simplify your work with vector graphics on the web. If you want...
Javascript library for drag'n'drop that seems to have more options than native HTML5 drag'n'drop.
When you need to check a value for presence, don't rely on JavaScript since it considers 0 or "0...
In a JavaScript console, type this: > 9112347935156469760 9112347935156470000 Ooops. And that's not a float! This occurs because JavaScript uses...
JavaScript's NaN ("Not a Number") is hard to compare against. It never equals anything, not even itself:
JavaScript structures that include circular references can't be serialized with a"plain" JSON.stringify. Example: a = { name: 'Groucho' };
Create beautiful Javascript charts with one line of Ruby. Promising chart library for easily rendering charts with Google Charts.
Capybara will fail to find tags that are missing an href attribute. This will probably happen to you every now...
PDFKit converts a web page to a PDF document. It uses a Webkit engine under the hood...
If you want to move an element inside an array, neither JavaScript/ES6+ nor libraries like LoDash offet that natively.
Nearly all jQuery traversal functions ignore elements that are not HTML tags. To work with other type of nodes (like...
Amazing guide how to divide a ball of Javascript spaghetti distinct separate layers (model, view, controller, backend adapter).
Automatically builds gems from Bower packages (currently 1700 gems available). Packaged Javascript files are then automatically available in your asset...
This card describes how to pass an array with multiple element to a JavaScript function, so that the first array...
When you cannot make Selenium trigger events you rely on (e.g. a "change" event when filling in a form field...
An all-in-approach to fix the problem of pending AJAX requests dying in the browser when the server ends...
React.js is a relatively new Javascript templating engine that has two-way-bindings like AngularJS or Batman. The interesting idea...
When you want the table headers to always stay around (e.g. because that table is huuuge), use the code below...