Skip to content

Instantly share code, notes, and snippets.

@siygle
Created July 1, 2012 10:35
Show Gist options
  • Select an option

  • Save siygle/3027856 to your computer and use it in GitHub Desktop.

Select an option

Save siygle/3027856 to your computer and use it in GitHub Desktop.
Get Web Site ICON - folk from [http://jsfiddle.net/chriscoyier/WTAr9/]
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<a href=http://github.com>GitHub</a>
<a href=http://css-tricks.com>CSS-Tricks</a>
<a href=http://www.google.com>Google</a>
<a href=http://jsfiddle.net/chriscoyier/6Vg7t/3/>JSfiddle</a>
<a href=http://www.google.com:80>Google</a>
<a href=http://doesnotexistsreallyreallyreally.com>Nope</a>
<a href=http://127.0.0.1>localhost</a>
</body>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="index.js"></script>
</html>
$("a[href^='http']").each(function() {
$(this).css({
background: "url(http://g.etfv.co/" + this.href + ") left center no-repeat",
"padding-left": "20px"
});
});
a { display: block; text-decoration: none; padding: 5px; } ​
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment