Skip to content

Instantly share code, notes, and snippets.

@t0dd
Created May 29, 2013 05:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t0dd/5668213 to your computer and use it in GitHub Desktop.
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
//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