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

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

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

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

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

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
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...

makandra dev

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

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

Best results in other decks

What is a Cookie? Google it if you do not know. How are cookies transferred between your browser and...

Just like we use gems on the server, we use third party JavaScript libraries in the browser. These typically provide...

Search in all decks