Return to Snippet

Revision: 20845
at November 27, 2009 05:53 by AzizLight


Initial Code
#
$(document).ready(function() {
#
  $('#extlinks a').filter(function() {
#
    return this.hostname && this.hostname !== location.hostname;
#
  }).after(' <img src="/images/external.png" alt="external link"/>');
#
});

Initial URL
http://www.learningjquery.com/2008/08/quick-tip-dynamically-add-an-icon-for-external-links

Initial Description


Initial Title
Dynamically add an icon for external links

Initial Tags
javascript, jquery

Initial Language
jQuery