Find-as-you-type boxes are usually built by observing changes in a text field, and querying the server via...

shoelace is a library of web components. Here is a proof of concept how a integration (slightly different as the...

developer.mozilla.org

When building a form with a file select field, you may want to offer your users a live preview before...

Most browsers have built-in drag and drop support for different page elements like text and images. While this may...

makandra dev

General hints on the DOM the root of the DOM is document custom elements inherit from HTMLElement. They need a...

TinyMCE is a WYSIWYG editor which is quite customizable. Add a custom button to the tinyMCE toolbar and tell tinyMCE...

Sometimes you want to load code on demand. For instance, when a a large library is only used on a...

Haml lets you prefix a group of attributes by wrapping them in a hash. This is only possible with the...

Let's say you want to merge the properties of two JavaScript objects: let a = { foo: 1, bar: 2 }

So I had the issue that User input (coming from many different sources and users) often contains the...

to create a Gallery that has a name and has_many :images, which in turn have a...

The Ace editor is a great enhancement when you want users to supply some kind of code (HTML, JavaScript, Ruby...

makandracards.com

With the new unpoly client side templates (available since 3.10) there's another way to substitute the ids of inserted...

Having a unique selector for an element is useful to later select it from JavaScript or to update a fragment...

tutorialzine.com

A very clever hack to parse a structured URL object is to create a element and set its href to...

As you may know, HAML expands data attributes that are given as a hash: %div{ data: { count: 3 } }

makandra dev

When a Rails controller action should handle both HTML and JSON responses, do not use request.xhr? to decide that. Use...

makandra dev
github.com

Katapult 0.3.0 brings Rails 5 and Ruby 2.5 support with a new design, plus a ton of smaller features, fixes...

There is no build in functionally in jQuery and Prototype to extract params from a url. You can use this...

The attached Coffeescript helper will let you create mouse events: $element = $('div') Trigger.mouseover($element) Trigger.mouseenter($element) Trigger.mousedown($element) Trigger.mouseup($element...