Forked from StabbyMcDuck/gist:ea78f9edd2b113a4a30204ee7c928949
Created
May 31, 2018 19:00
-
-
Save KronicDeth/8d406765c0063bcec0e4adc3c12c7d61 to your computer and use it in GitHub Desktop.
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
function insertHREFs() { | |
// get all anchor tags | |
// THIS DOESN'T WORK IN IE OR CHROME - INACTIVE a tags | |
var queryAllAWithSelector = document.querySelectorAll('a[data-nav-control-id]'); | |
for(var dataLoop=0; dataLoop < queryAllAWithSelector.length; dataLoop++) { | |
var dataNav = element.getAttribute('data-nav-control-id'); | |
var value = obj.get(dataNav); | |
concatenateURL(element, value); | |
} | |
/* | |
// THIS WORKS IN CHROME | |
document.querySelectorAll('a[data-nav-control-id]').forEach(function(element) { | |
var dataNav = element.getAttribute('data-nav-control-id'); | |
var value = obj.get(dataNav); | |
concatenateURL(element, value); | |
}); */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment