Created
May 29, 2013 05:50
-
-
Save t0dd/5668213 to your computer and use it in GitHub Desktop.
Using jQuery to select external & internal links using just attribute and css selectors
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
//Selecting all the external links of a page | |
$('a[href^="http://"]') | |
//Selecting all the internal links of a page | |
$('a:not(a[href^="http://"])') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment