Skip to content

Instantly share code, notes, and snippets.

@anwerashif
Created February 7, 2025 13:21
Show Gist options
  • Save anwerashif/6f65f0e700e8fc84b293644d4f0d189c to your computer and use it in GitHub Desktop.
Save anwerashif/6f65f0e700e8fc84b293644d4f0d189c to your computer and use it in GitHub Desktop.
Custom JS Code to Add Numbers In FAQ's Question
document.querySelectorAll('.faq-header').forEach((header, index) => {
const number = (index + 1).toString().padStart(2, '0');
header.innerHTML = `<span style="font-weight: bold; margin-right: 8px;">${number}.</span> ${header.innerHTML}`;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment