Using Javascript to insert content into the DOM
JavaScript gives us multiple ways to insert content into the DOM. One generic and simple way and a more flexible and complicated alternative. Inserting new elements: The simple version # The simple...
JavaScript gives us multiple ways to insert content into the DOM. One generic and simple way and a more flexible and complicated alternative. Inserting new elements: The simple version # The simple...
Most of the work I've done recently has been as inline SVG meaning that the SVG is inserted directly into the document; this has advantages and disadvantages. In this post we'll discuss why we would...
The web has always been a scrolling medium but there are reasons and motivations that will make people decide for one or the other. There is no perfect 'one-size-fits-all' solution and you will have...
Addy Osmani posted a note on twitter about native lazy loading support that will, hopefully, appear in Chrome 75 (canary builds as I write this). This is awesome and I hope that other browsers will...
In addition to pointer events, we should also provide a way for keyboard-only users or those users who prefer keyboard navigation to access content. This is particularly important when using custom...
Having to code for touch, mouse and keyboard events is a pain. There has to be a way to make the code easier to work with events. The code will not be shorter (we have to work around the lack of...
I was looking at Brad Frost's site to look at how he did the little circles at the top and bottom of the page. Hint: he does with a ton of SVG circles and some very interesting use of JavaScript to...
We saw how to create a working templating system using one of many available templating engine (Nunjucks from Mozilla). But it takes a while to get that first step where the template building works as...
This is a response to a page that raised enough concenrts for me to want to write about it but not important enough to put into my regular post rotation The page that started the research and this...
The idea behind SVG sprites is similar to sprite sheets using CSS to place the images on the page. The structure of the demonstration project is as follows: svg-sprites ├── gulpfile.js ├── icons └──...