Created
February 7, 2025 13:21
-
-
Save anwerashif/6f65f0e700e8fc84b293644d4f0d189c to your computer and use it in GitHub Desktop.
Custom JS Code to Add Numbers In FAQ's Question
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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