Search Results for: javascript

JavaScript & DOM Tips, Tricks, and Techniques (No. 4)

This e-book package is a collection of 54 tips and techniques, plus three long-form articles, each originally published in individual releases of Web Tools Weekly, and on this website. Buy Now for $7.99 Purchase is done via Leanpub. Book Info Number of pages in PDF: 123 E-Book formats in package: EPUB, PDF Number of tips: […]

How to Disable JavaScript in Almost Any Browser

Disable JavaScript in the Browser In 2022 I think it’s still important as a web developer to test your how your websites look and function when users disable JavaScript in their browser. Developing in this way used to be a cornerstone of Progressive Enhancement and can be handy on both desktop or mobile.

I still find myself wanting disabling JavaScript on pages I visit. Sometimes it’s to test a page I’m working on, but in other instances it’s simply to visit a web page that’s not functioning correctly and I want to see if JavaScript is the culprit.

Fading in a Page on Load with CSS & JavaScript

Fading in a Page on Load with CSS & JavaScript When I visit a page, I get annoyed when I try to interact with elements while the website is still loading. Often stuff is moving around, fonts aren’t quite loaded, and it feels broken.

I know nowadays we’re obsessed in this industry with gaining every millisecond in page performance. But in a couple of projects that I recently overhauled, I added a subtle and clean loading mechanism that I think makes the experience nicer, even if it does ultimately slightly delay the time that the user is able to start interacting with my page.

The Weird World of Infinity in JavaScript

Infinity in JavaScript You are probably aware that ECMAScript has something called Infinity, which is a numeric value that you can apply to any variable, the same way you can apply other numbers as values for variables.

Infinity of course is not the same as other numbers, so I thought I’d summarize, with examples, many of the quirks and useful facts around JavaScript Infinity and how it works.

JavaScript & DOM Tips, Tricks, and Techniques E-Book (No. 3)

This e-book package is a collection of 54 tips and techniques, plus three long-form articles, each originally published in individual releases of Web Tools Weekly, and on Impressive Webs and CSS-Tricks. Buy Now for $7.99 Purchase is done via Leanpub. Book Info Number of pages in PDF: 131 E-Book formats in package: EPUB, MOBI, PDF […]

A Little-known Fact About JavaScript Hoisting

JavaScript HoistingAt some point when reading about scope in JavaScript, you may have come across the term hoisting. It’s often used in the context of variable or function definitions.

For example, consider the following code:

JavaScript & DOM Tips, Tricks, and Techniques E-Book (No. 2)

This e-book package is a collection of 68 tips and techniques, each originally published in individual releases of Web Tools Weekly, a newsletter geared towards front-end developers. Buy Now for $7.99 Purchase is done via Leanpub. Book Info Number of pages in PDF: 101 E-Book formats in package: EPUB, MOBI, PDF Number of tips: 68 […]

A JavaScript & DOM E-Book Offer

A JavaScript & DOM E-Book OfferAs many of you know, I publish a weekly newsletter called Web Tools Weekly that’s now gained a pretty nice subscriber base of over 10,000. In addition to the weekly list of categorized tools, each issue usually starts with a brief tutorial or tip, usually something focused on JavaScript and the DOM.

After 80+ issues, I’ve amassed quite a bit of JavaScript- and DOM-focused content. All of that content is available for free in the Web Tools Weekly archives. However, for those who would like to read the tips on a tablet or mobile device, I thought it would be useful to put it together in book form in PDF, EPUB, and MOBI formats. So I’ve just released JavaScript & DOM Tips, Tricks, and Techniques, a collection of 70 tips (125+ pages in PDF), priced at $5.

JavaScript & DOM Tips, Tricks, and Techniques E-Book

This e-book package is a collection of 68 tips and techniques, each originally published in individual releases of Web Tools Weekly, a newsletter geared towards front-end developers. Buy Now for $7.99 Purchase is done via Leanpub. Book Info Number of pages in PDF: 114 E-Book formats in package: EPUB, MOBI, PDF Number of tips: 68 […]

JavaScript ‘this’ in Different Contexts

JavaScript thisJavaScript has a reserved keyword called this that references something different depending on where you are in a JavaScript program.

In this post I’m going to summarize, by example, some different contexts and discuss what “this” would represent in each case. Note that all of these examples assume you’re developing client-side JavaScript in a browser.