Last active
June 2, 2017 21:43
-
-
Save awatson1978/828521fed954c5d2b23b to your computer and use it in GitHub Desktop.
Extract Ids From Template/Page
This file contains 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
// the following will return an array of elements with ids set | |
$('[id]') | |
// so one would need something like this.... | |
var elements = $('[id]'); | |
var idsArray = []; | |
elements.forEach(function(element){ | |
idsArray.push(element.id); | |
}); | |
// you can also try a regex | |
\id="(.*?)"\ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment