Code splitting is a feature of esbuild that can keep huge libraries out of the main bundle. How code splitting...

Jasmine specs for the frontend often need some DOM elements to work with. Because creating them is such a common...

From Exploring ES6: Module imports are hoisted (internally moved to the beginning of the current scope). Therefore, it doesn’t...

Event delegation is a pattern where a container element has a single event listener that handles events for all descendants...

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

The attached compiler() function below applies JavaScript behavior to matching HTML elements as they enter the DOM. This works like...

getbootstrap.com

Recently I made an upgrade from Bootstrap 3 to Bootstrap 4 in a bigger project. Here are some tips how...

CSP hat zum Ziel einen Browser-seitigen Mechanismus zu schaffen um einige Angriffe auf Webseiten zu verhindern, hauptsächlich XSS...

Select2 is a fantastic library for advanced dropdown boxes, but it depends on jQuery. Alternatives Tom Select

makandra dev
select2.org

Select2 comes with AJAX support built in, using jQuery's AJAX methods. ... For remote data sources only, Select2 does not...

jQuery is still a useful and pragmatic library, but chances are increasingly that you’re not dependent on using it...

makandra dev

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

makandra dev

webpack is a very powerful asset bundler written in node.js to bundle (ES6) JavaScript modules, stylesheets, images, and other assets...

jQuery has a function $.fn.trigger(). You can use it to dispatch an event on a jQuery object: let $element = $('.foo...

Some older Node modules rely on window.jQuery to be present. One suggested solution is to use this config in the...

To avoid multiple versions of a package, you can manually maintain a resolutions section in your package.json. We recommend you...

This is a short overview of things that are required to upgrade a project from the Asset Pipeline to Webpacker...

github.com

See the attached link for a useful overview of modern (and classic) DOM API methods, like matches, contains, append, cssText...

makandra dev

This is a presentation from 2019-01-21. Summary We want to move away from jQuery in future projects

Rails ships with two separate build pipelines: Sprockets ("asset pipeline") and Webpacker. Webpacker has many more moving parts, but allows...

Accessing pseudo elements via JavaScript or jQuery is often painful/impossible. However, accessing their styles is fairly simple. Using getComputedStyle

api.jquery.com

jQuery's removeClass removes the given class string from an element collection. If you want to remove multiple/unknown classes matching...

github.com

Masonry is a famous library to dynamically arrange a grid of items that have different aspect ratio, like horizontal and...

github.com

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