Created
April 11, 2012 07:50
-
-
Save Ikke/2357689 to your computer and use it in GitHub Desktop.
Check if there are any relative urls
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 checkForRelativeLinks = function() { | |
console.log("Checking for relative urls") | |
$('a').each(function () { | |
var url = $(this).attr('href'); | |
if (url && url != "#" && url.substr(0, 7) != "http://" && url.substr(0, 11) != "javascript:") { | |
console.log(this); | |
} | |
}); | |
} | |
setTimeout(checkForAbsoluteLinks, 2000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment