
How to Check an Element Exists with and Without jQuery
Check whether an element exists with jQuery or vanilla JavaScript before running DOM code, avoiding null errors and fragile client‑side behaviour.
Articles
Front‑end development is where product intent becomes the interface people actually use. My writing approaches it as engineering rather than surface decoration, with attention to browser behaviour and code that remains accessible, fast, and safe for a team to change.

Check whether an element exists with jQuery or vanilla JavaScript before running DOM code, avoiding null errors and fragile client‑side behaviour.

Opening a new browser window programmatically on‑click is very simple to achieve with jQuery, and no more complex to achieve with vanilla JavaScript too!

A bug in the WebKit engine that only affects website Retina screen devices means that setting a zero‑blur filter in CSS isn't as easy as it should be.

Use links for navigation and buttons for actions, preserving native focus and keyboard behaviour before adding custom click handlers or ARIA roles.

Choose between textContent and innerHTML safely, handle Internet Explorer's innerText fallback, and know exactly when untrusted HTML needs sanitisation.

removeEventListener() Needs the Same Function ReferenceUnderstand why removeEventListener needs the original callback reference, how anonymous functions differ, and what Internet Explorer required in 2010.