Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(function(){
// check browser support
if (!document.querySelectorAll || ![].forEach) {
return false;
}
// search teasers
var teasers = document.querySelectorAll('.teaser-leader-m');
[].forEach.call(teasers, function(d) {
// search link within teaser
var link = d.querySelector('.teaser__link__text');
// add click handler
d.addEventListener('click', function() {
var win = window.open(link, '_blank');
win.focus();
});
});
}())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.