Skip to content

Instantly share code, notes, and snippets.

@benjclark
Created March 31, 2022 17:37
Show Gist options
  • Save benjclark/a621913b9bb8ea5bf8dd0232b036501e to your computer and use it in GitHub Desktop.
Save benjclark/a621913b9bb8ea5bf8dd0232b036501e to your computer and use it in GitHub Desktop.
getDtDdPairs
function getDtDdPairs() {
const dts = document.querySelectorAll('dt');
const dds = document.querySelectorAll('dd');
const pairs = [];
for (let i = 0; i < dts.length; i++) {
pairs.push([dts[i], dds[i]]);
}
return pairs;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment