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()')
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...
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.
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...
...s legendary Functional library, here’s a lightweight tool to help keep track of JavaScript invocations. It works in Chrome, Safari, Firebug and IE8...
A lightweight javascript date library for parsing, manipulating, and formatting dates...
...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...
...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...
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...
String manipulation extensions for the Underscore.js javascript library...
...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...
...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...
This works in all relevant browsers: document.activeElement You can use this in your Selenium steps, for example, to assert that...
Added information about what jQuery considers "visible" Added a solution for Prototype Added a patch for Prototype that replaces the...
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...
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...
KeyboardJS is a library for binding to keys or key combos