Add an icon for external links


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.