Posted By


cs2css3 on 05/13/10

Statistics


Viewed 532 times
Favorited by 0 user(s)

cs2css3's extention


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



Copy this code and paste it in your HTML
  1. $(function(){
  2. $("#contents a[href^='mailto']").after("<span class='iconmail'>&nbsp;</span>");
  3. $("#contents a[href$='pdf']").after("<span class='iconpdf'>&nbsp;</span>").click(function(){window.open(this.href, '_blank');return false;});
  4. $("#contents a[href$='xls']").after("<span class='iconxls'>&nbsp;</span>").click(function(){window.open(this.href, '_blank');return false;});
  5. $("#contents a[href$='doc']").after("<span class='icondoc'>&nbsp;</span>").click(function(){window.open(this.href, '_blank');return false;});
  6. $("#contents a[href^=http://]").not("#contents a[href^=thisPage], #contents a[href$='pdf'], #contents a[href$='xls'], #contents a[href$='doc']").after("<span class='extlink'>&nbsp;</span>").click(function(){
  7. window.open(this.href, '_blank');return false;
  8. });
  9. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.