Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

[jQuery plugin] favicon prepender

View favicon.js
1 2 3 4 5
// jQuery plugin prepending chosen <a>'s with favicon
(function($){$.fn.preFav=function(){$(this).css('background','url('+$(this).attr('href').replace(/^(http:\/\/[^\/]+).*$/,'$1') +'/favicon.ico'+') no-repeat 0 0').css('padding-left','18px');};})(jQuery);
 
// usage:
$('a.fav').preFav();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.