Skip to main content
CSS-Tricks
  • Articles
  • Notes
  • Links
  • Guides
  • Almanac
  • Picks
  • Shuffle
Search

Articles Tagged
JavaScript

155 Articles
Direct link to the article A Better API for the Intersection and Mutation Observers
JavaScript

A Better API for the Intersection and Mutation Observers

Zell discusses refactoring the Resize, Mutation, and Intersection Observer APIs for easier usage, demonstrating how to implement callback and event listener patterns, while highlighting available options and methods.
Zell Liew on Jun 23, 2025
Direct link to the article A Better API for the Resize Observer
JavaScript

A Better API for the Resize Observer

ResizeObserver, MutationObserver, and IntersectionObserver enhance performance over their predecessors. Zell discusses their API similarities, usage steps, refactoring strategies, and advantages with practical examples.
Zell Liew on Jun 16, 2025
Direct link to the article Quick Hit #21
JavaScript opinion php

Quick Hit #21

Seeing a lot more headlines decrying JavaScript and pumping up PHP. Always interesting to see which direction the front-end zeitgeist is leaning.…
Geoff Graham on Sep 20, 2024
Direct link to the article All About JavaScript Loops
JavaScript

All About JavaScript Loops

Every programming language has loops. Loops perform an operation (i.e., a chunk of work) a number of times, usually once for every item in an array or list, or to simply repeat an operation until a certain condition is met.…

Erick Merchant on Aug 21, 2024
Direct link to the article Named Element IDs Can Be Referenced as JavaScript Globals
global scope JavaScript

Named Element IDs Can Be Referenced as JavaScript Globals

Did you know that DOM elements with IDs are accessible in JavaScript as global variables? It’s one of those things that’s been around, like, forever but I’m really digging into it for the first time.

If this is the first …

Matteo Mazzarolo on May 1, 2024
Direct link to the article Comparing Node JavaScript to JavaScript in the Browser
JavaScript node

Comparing Node JavaScript to JavaScript in the Browser

Being able to understand Node continues to be an important skill if you’re a front-end developer. Deno has arrived as another way to run JavaScript outside the browser, but the huge ecosystem of tools and software built with Node mean …

Hugh Haworth on Feb 18, 2022
Direct link to the article 9 New React and JavaScript Links for February 2022
JavaScript react

9 New React and JavaScript Links for February 2022

Every now and then, I find that I’ve accumulated a bunch of links about various things I find interesting. Like React and JavaScript! Here’s a list of nine links to other articles about them that I’ve been saving up and …

Chris Coyier on Feb 11, 2022
Direct link to the article How to Cycle Through Classes on an HTML Element
classes classlist JavaScript

How to Cycle Through Classes on an HTML Element

Say you have three HTML classes, and a DOM element should only have one of them at a time:

<div class="state-1"</div<div class="state-2"</div<div class="state-3"</div

Now your job is to rotate them. That is, cycle through classes …

Chris Coyier on Jan 26, 2022
Direct link to the article The Invisible JavaScript Backdoor
JavaScript security unicode

The Invisible JavaScript Backdoor

An interesting (scary) trick of an nearly undetectable exploit. Wolfgang Ettlinger:

What if a backdoor literally cannot be seen and thus evades detection even from thorough code reviews?

I’ll post the screenshot of the exploit from the post with the …

Chris Coyier on Dec 8, 2021
  • 1
  • 2
  • 3
  • ...
  • 18
  • Older

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Contact
  • Write for CSS-Tricks!
  • Advertise with us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • Bluesky
Back to Top