Getting a regular expression from a string in JavaScript is quite simple: new RegExp('Hello Universe'); # => /Hello Universe/
This trick might be useful to implement more complicated directives in AngularJS. I needed it to do drag'n'drop...
When HTTP clients make an request they can define which response formats they can process. They do it by adding...
Authentication is hard: there are many edge cases, and most users (including yourself) usually only go the "happy path" once...
jQuery plugin to fire events when user's cursor aims at particular dropdown menu items. For making responsive mega dropdowns...
Note: This technique is confusing and slows down your test suite. Copy the attached code to features/support. This gets you...
TL;DR: Variables not declared using var are stored outside the current scope, most likely in the global scope (which...
When a controller action redirects to an external URL (like http://somehost.com/some/path) you will find that this is hard...
Great presentation about writing Javascript like you write everything else: Well-structured and tested. JavaScript is no longer a toy...
Great look at the tradeoffs between progressive enhancement with jQuery or similiar, vs. client-side views.
Chart.js seems to be a good alternative to Google's Chart API and other commercial chart drawing libraries.
If your project uses Lodash or Underscore.js, you can use _.isEqual(): _.isEqual([1, 2], [2, 3]) // => false _.isEqual([1, 2...
If you open a pop-up window [1] in your Selenium tests and you want to close it, you can...
This error can happen in Ruby 1.9. To fix it, add the following line to the top of your .js.erb...
JavaScripts and CSS should be minified for production use. In Rails 3.1+ the asset pipeline will take care of this...
If you need to capture signatures on an IPad or similar device, you can use Thomas J Bradley's excellent...
This works well in the simplified case, when your link disappears after it was clicked. Let link_to_remote behave...
A tooltip library that does not use Javascript. Works in IE9+. This library (or the technique used by it) could...
Spreewald now comes with a step that tests if a form field is visible: Then the "Due date" field should...
Behave.js is a lightweight library for adding IDE style behaviors to plain text areas, making it much more enjoyable to...
Prism is a new lightweight, extensible syntax highlighter, built with modern web standards in mind. It’s a spin-off...
The attached article outlines considerations when choosing client-side vs. server-side implementations of the Google Geocoding APIs (geocoder, directions...
So you want to find out how many horizontal pixels you have available on a mobile device. This is super...
Every time you call $(...) jQuery will create a new object. Because of this, comparing two jQuery collections with == will never...