JavaScript

Front-end development, browser quirks, and JavaScript tooling.

Nested Forms in Rails 8: Life After Cocoon and Webpacker

accepts_nested_attributes_for still works. A small Stimulus controller handles the rest.

rails javascript how-to

Turbo Streams Instead of Nested Forms

When the parent already exists, you probably don't need a nested form at all

rails javascript how-to

Rails 6, Webpacker, and jQuery

Quickly add jQuery to your Rails 6 application using Webpacker

rails javascript how-to

Easily Add An Instagram Feed To Jekyll

How to easily add an Instagram feed to your Jekyll site, while avoiding the gotchas.

code javascript how-to

IE tries to be helpful when using JavaScript to set the href attribute

When using JavaScript to set the href attribute of an anchor tag, IE sometimes updates the inner HTML. Why does this happen and what are some solutions?

javascript how-to

IE7 resize window problem

I describe a problem encountered in IE7 when dealing with a centered body and relatively positioned elements that appeared to have a fixed position.

javascript how-to

Caching Locale-specific Dynamic JavaScript Files

Using ERB-rendered JavaScript with per-locale page caching in Rails

rails javascript how-to

Nads: My First Firefox Extension

Building a Firefox extension that hides ads on web pages using XUL and JavaScript

javascript code

Google Maps API with large data sets

Exploring optimization techniques for displaying thousands of markers on a Google Map

javascript how-to