Return to Snippet

Revision: 17119
at August 24, 2009 08:46 by batamire

Initial Code
     return this.hostname && this.hostname !== location.hostname;
}).each(function() {
    var link = jQuery(this);
    var faviconURL =
      link.attr('href').replace(/^(http:\/\/[^\/]+).*$/, '$1')+'/favicon.ico';
    var faviconIMG = jQuery('<img src="favicon.png" alt="" />')['appendTo'](link);
    var extImg = new Image();
    extImg.src = faviconURL;
    if (extImg.complete)
      faviconIMG.attr('src', faviconURL);
      extImg.onload = function() { faviconIMG.attr('src', faviconURL); };

Initial URL

Initial Description
From Liviu HolhoÅŸ - Blog

Initial Title
Add a favicon near external links with jQuery

Initial Tags
link, jquery

Initial Language