DEV Community

Haoxuan Hu
Haoxuan Hu

Posted on

I built a zero-dependency WordPress glossary tooltip plugin

I built a zero-dependency WordPress glossary tooltip plugin

The Problem

Most WordPress glossary plugins are bloated. They load jQuery, add dozens of settings nobody uses, and slow down your site. I wanted something that just works — lightweight, fast, and modern.

What I Built

Lite-Glossary is a minimalist WordPress plugin that adds hover tooltips to terms in your post content.

You define your terms in the admin panel, and the plugin automatically highlights them in your content. Hover over a term → see its definition.

Key Features

  • Zero dependencies — pure CSS + Vanilla JS, no jQuery
  • Smart matching — automatically skips existing links and headings
  • First-occurrence mode — highlight each term only once per post
  • Bulk CSV import — add hundreds of terms at once
  • Built-in caching — Transient caching keeps it fast
  • Full English and Chinese support — optimized for multibyte characters

Why No jQuery?

Most glossary plugins still depend on jQuery because they were built years ago and never updated. In 2026, there's no reason to load an extra library just for hover tooltips. Pure Vanilla JS does the job perfectly.

Tech Stack

  • PHP 7.0+
  • Pure CSS + Vanilla JS
  • WordPress Transient API for caching
  • DOMDocument for safe content parsing

Try It Out

👉 GitHub: https://github.com/Simon-xuan/Lite-Glossary

Would love any feedback or feature suggestions

Top comments (0)