Posted By

Mithun on 11/26/09


Tagged

link jquery icon


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

Mithun
millano5
Balamir


jQuery Dynamically add an icon for external links


 / Published in: JavaScript
 

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

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

Report this snippet  

You need to login to post a comment.