Created
November 30, 2018 16:16
-
-
Save alvin-milton/118fbeaff0fea3f21cfdb98a6bee7f6b to your computer and use it in GitHub Desktop.
Checks to see if links have targets, what they are, if not what link has a missing target
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
$('a').each(function () { | |
if ($(this).attr('target')) { | |
console.log($(this).attr('target')) | |
console.log('target set', $(this).attr('href')) | |
} else { | |
console.log('no target set', $(this).attr('href')) | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment