bitbucket.org

String manipulation extensions for the Underscore.js javascript library...

hacks.mozilla.org

...Web APIs haven’t provided the functionality to copy text to the clipboard through JavaScript, which is why visiting GitHub with Flash disabled shows an ugly grey box where the...

...and slated to move to release in mid-September, it is becoming available to JavaScript within user-action initiated callbacks...

makandra dev
github.com

...following links in your web application faster. Instead of letting the browser recompile the JavaScript and CSS between each page change, it keeps the current page instance alive and replaces...

...you get the bulk of the speed benefits from pjax (no recompiling of the JavaScript or CSS) without having to tailor the server-side response. It just works...

stackoverflow.com

This works in all relevant browsers: document.activeElement You can use this in your Selenium steps, for example, to assert that...

makandracards.com

Added information about what jQuery considers "visible" Added a solution for Prototype Added a patch for Prototype that replaces the...

css-tricks.com

Crazy hack. Might be useful one day. The code required has since been extracted into a library.

...Put the attached file into features/support/ to make Capybara more patient in scenarios tagged @javascript...

github.com

Using the JS fullscreen API is painful because all browers use different methods and events and you need to use...

This is non-trivial because you need to fake event objects and require different code for different browsers. Luckily, there...

makandra dev
robertwhurst.github.com

KeyboardJS is a library for binding to keys or key combos

makandra dev
mailru.github.io

A set of javascript tools for working with files. It offers different kinds of things: A cross-browser JS API to work with File objects. Image helper methods, like rotating...

If you want to do JavaScript-style camelization, ActiveSupport's String#camelize method can actually help you out. Simply pass a :lower argument to it. >> 'foo_bar_baz'.camelize

To find an input with the type hidden, you need to specify the type hidden: find_field('Some label', type...

makandra dev
draggabilly.desandro.com

Javascript library for drag'n'drop that seems to have more options than native HTML5 drag'n'drop. They also claim to support "multi-touch", which would be awesome if...

...on touch devices. Another library with similar aims is interact.js (Github). They're pitching JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers...

...replace the tracking code with a debug version that prints debugging info to the JavaScript console...

...soft hyphens, which makes testing uncomfortable. Automatic insertion of soft hyphens You can use JavaScript libraries like hypher (includes LGPL patterns!) to automatically insert soft hyphens into the text of...

Loading the correct hyphenization patterns for the language you're using JavaScript to apply the library function to the DOM nodes you want hyphenated Manually adding exceptions...

The attached ImageLoader helper will start fetching an image and return an image that is resolved once the image is...

lesscss.org

Less.js is a JavaScript implementation of LESS that’s run by your web browser. As any JavaScript, you include a link to the script in your HTML, and…that’s...

chartjs.org

Chart.js seems to be a good alternative to Google's Chart API and other commercial chart drawing libraries.

...In other cases (e.g. currencies with changing exchange rates) this might not be possible. Javascripts Your Javascript might render text, dates, formats, etc., so you must at least implement minimal...

...a gem that gives you your Rails locale dictionary and the I18n class in Javascript. Note that you might be using Javascript libraries that render strings, e.g. date pickers. Make...

thecssninja.com

The attached article explains how to preload images with only CSS. No Javascript required. The gist is: .element:after { content: url(img01.jpg) url(img02.jpg) url(img03.jpg); display: none...

...get a second request, but the error page will show with full CSS and JavaScript. The code assumes you are using Ruby on Rails with better_errors, which is the...

robots.thoughtbot.com

Selenium has been the siren song that continually calls out to us. Unfortunately, in practice we’ve been unable to...