Created
June 29, 2015 19:24
-
-
Save czbaker/3b8469287d0339933557 to your computer and use it in GitHub Desktop.
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
| var liArray = document.querySelector('.button'); | |
| liArray.forEach(function(element) { | |
| // Grab the class name you need: | |
| var theClass = element.id.substr(0, element.id.length-7); | |
| // Grab the link inside. | |
| var theLink = element.querySelector('a'); | |
| // Do other things? | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment