I'm in a situation where I can't use jquery to select an element inside the DOM and trying to figure out how to use Javascript to do it.
The jquery path is $('.link-linkedin a').attr('href');
I'm trying to get to the href and open it in a new tab.
I found this - http://javascript.info/tutorial/searching-elements-dom and tried doing
var elem = document.getElementsByClassName('link-linkedin')
var list = elem.getElementsByTagName('a')
But I'm getting the error:
Uncaught TypeError: elem.getElementsByTagName is not a function(…)
Is there a better way to do this?